From fb0aefc4526ce9421b0a2330e710e21a56872277 Mon Sep 17 00:00:00 2001 From: xavier Date: Sat, 2 Feb 2013 23:57:14 +0000 Subject: [PATCH] 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 --- sources/genericpanel.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sources/genericpanel.cpp b/sources/genericpanel.cpp index 18dd082b4..ea23e7718 100644 --- a/sources/genericpanel.cpp +++ b/sources/genericpanel.cpp @@ -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)); }