mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-19 14:50:53 +01:00
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:
@@ -1245,9 +1245,11 @@ void GenericPanel::clearPanel() {
|
|||||||
firstActivated().
|
firstActivated().
|
||||||
*/
|
*/
|
||||||
bool GenericPanel::event(QEvent *event) {
|
bool GenericPanel::event(QEvent *event) {
|
||||||
if (first_activation_ && event -> type() == QEvent::WindowActivate) {
|
if (first_activation_) {
|
||||||
QTimer::singleShot(250, this, SLOT(emitFirstActivated()));
|
if (event -> type() == QEvent::WindowActivate || event -> type() == QEvent::Show) {
|
||||||
first_activation_ = false;
|
QTimer::singleShot(250, this, SLOT(emitFirstActivated()));
|
||||||
|
first_activation_ = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return(QTreeWidget::event(event));
|
return(QTreeWidget::event(event));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user