mirror of
https://github.com/fwbuilder/fwbuilder
synced 2026-09-16 01:49:23 +02:00
see #1998 an attempt to make sure signals that we use to update state of the tree panel are disconnected when user closes project panel
This commit is contained in:
@@ -104,13 +104,10 @@ void ProjectPanel::initMain(FWWindow *main)
|
||||
|
||||
main->undoGroup->addStack(undoStack);
|
||||
|
||||
connect(m_panel->treeDockWidget, SIGNAL(topLevelChanged(bool)),
|
||||
this, SLOT(topLevelChangedForTreePanel(bool)));
|
||||
connect(m_panel->treeDockWidget, SIGNAL(visibilityChanged(bool)),
|
||||
this, SLOT(visibilityChangedForTreePanel(bool)));
|
||||
|
||||
// connect(m_panel->bottomDockWidget, SIGNAL(topLevelChanged(bool)),
|
||||
// this, SLOT(topLevelChangedForBottomPanel(bool)));
|
||||
// connect(m_panel->treeDockWidget, SIGNAL(topLevelChanged(bool)),
|
||||
// this, SLOT(topLevelChangedForTreePanel(bool)));
|
||||
// connect(m_panel->treeDockWidget, SIGNAL(visibilityChanged(bool)),
|
||||
// this, SLOT(visibilityChangedForTreePanel(bool)));
|
||||
|
||||
fd = new findDialog(this, this);
|
||||
fd->hide();
|
||||
@@ -1038,11 +1035,18 @@ void ProjectPanel::showEvent(QShowEvent *ev)
|
||||
if (fwbdebug) qDebug() << "ProjectPanel::showEvent " << this
|
||||
<< "title " << mdiWindow->windowTitle();
|
||||
|
||||
connect(m_panel->treeDockWidget, SIGNAL(topLevelChanged(bool)),
|
||||
this, SLOT(topLevelChangedForTreePanel(bool)));
|
||||
connect(m_panel->treeDockWidget, SIGNAL(visibilityChanged(bool)),
|
||||
this, SLOT(visibilityChangedForTreePanel(bool)));
|
||||
|
||||
m_panel->treeDockWidget->raise();
|
||||
QWidget::showEvent(ev);
|
||||
|
||||
// we get this event when subsindow is maximized or restored
|
||||
// we get this event when MDI window is maximized or restored
|
||||
loadState();
|
||||
|
||||
visibilityChangedForTreePanel(true);
|
||||
}
|
||||
|
||||
void ProjectPanel::hideEvent(QHideEvent *ev)
|
||||
@@ -1050,6 +1054,11 @@ void ProjectPanel::hideEvent(QHideEvent *ev)
|
||||
if (fwbdebug) qDebug() << "ProjectPanel::hideEvent " << this
|
||||
<< "title " << mdiWindow->windowTitle();
|
||||
|
||||
disconnect(m_panel->treeDockWidget, SIGNAL(topLevelChanged(bool)),
|
||||
this, SLOT(topLevelChangedForTreePanel(bool)));
|
||||
disconnect(m_panel->treeDockWidget, SIGNAL(visibilityChanged(bool)),
|
||||
this, SLOT(visibilityChangedForTreePanel(bool)));
|
||||
|
||||
QWidget::hideEvent(ev);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user