Improved the way the GenericPanel class detects it is being displayed for the first time.

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2019 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
xavier
2013-02-02 23:57:14 +00:00
parent 70b7cd7d16
commit fb0aefc452

View File

@@ -1245,9 +1245,11 @@ void GenericPanel::clearPanel() {
firstActivated().
*/
bool GenericPanel::event(QEvent *event) {
if (first_activation_ && event -> type() == QEvent::WindowActivate) {
QTimer::singleShot(250, this, SLOT(emitFirstActivated()));
first_activation_ = false;
if (first_activation_) {
if (event -> type() == QEvent::WindowActivate || event -> type() == QEvent::Show) {
QTimer::singleShot(250, this, SLOT(emitFirstActivated()));
first_activation_ = false;
}
}
return(QTreeWidget::event(event));
}