[qet] [2019] Improved the way the GenericPanel class detects it is being displayed for the first time .

[ Thread Index | Date Index | More lists.tuxfamily.org/qet Archives ]


Revision: 2019
Author:   xavier
Date:     2013-02-03 00:57:14 +0100 (Sun, 03 Feb 2013)
Log Message:
-----------
Improved the way the GenericPanel class detects it is being displayed for the first time.

Modified Paths:
--------------
    trunk/sources/genericpanel.cpp

Modified: trunk/sources/genericpanel.cpp
===================================================================
--- trunk/sources/genericpanel.cpp	2013-01-29 23:03:09 UTC (rev 2018)
+++ trunk/sources/genericpanel.cpp	2013-02-02 23:57:14 UTC (rev 2019)
@@ -1245,9 +1245,11 @@
 	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));
 }


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/