mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 12:40:35 +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().
|
||||
*/
|
||||
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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user