mirror of
https://github.com/fwbuilder/fwbuilder
synced 2026-03-23 19:57:21 +01:00
see #2276 avoid resotring state when project panel gets visibilityChanged signal
This commit is contained in:
parent
78f52e8689
commit
59aaf53fbf
@ -1129,8 +1129,8 @@ void FWWindow::subWindowActivated(QMdiSubWindow *subwindow)
|
||||
if (subwindow==NULL) return;
|
||||
|
||||
if (fwbdebug)
|
||||
qDebug() << "FWWindow::subWindowActivated subwindow="
|
||||
<< subwindow
|
||||
qDebug() << "FWWindow::subWindowActivated subwindow=" << subwindow
|
||||
<< "previous_subwindow=" << previous_subwindow
|
||||
<< " "
|
||||
<< subwindow->windowTitle()
|
||||
<< "isMaximized()=" << subwindow->isMaximized();
|
||||
|
||||
@ -740,6 +740,9 @@ void ObjectTreeView::updateAfterPrefEdit()
|
||||
|
||||
void ObjectTreeView::ExpandTreeItems(const set<int> &ids)
|
||||
{
|
||||
if (fwbdebug)
|
||||
qDebug() << "ObjectTreeView::ExpandTreeItems()";
|
||||
|
||||
QTreeWidgetItemIterator it(this);
|
||||
while ( *it )
|
||||
{
|
||||
|
||||
@ -104,11 +104,6 @@ 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)));
|
||||
|
||||
fd = new findDialog(this, this);
|
||||
fd->hide();
|
||||
|
||||
@ -1036,16 +1031,16 @@ void ProjectPanel::showEvent(QShowEvent *ev)
|
||||
|
||||
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->treeDockWidget, SIGNAL(visibilityChanged(bool)),
|
||||
// this, SLOT(visibilityChangedForTreePanel(bool)));
|
||||
|
||||
m_panel->treeDockWidget->raise();
|
||||
QWidget::showEvent(ev);
|
||||
|
||||
// we get this event when MDI window is maximized or restored
|
||||
loadState();
|
||||
// loadState();
|
||||
|
||||
visibilityChangedForTreePanel(true);
|
||||
// visibilityChangedForTreePanel(true);
|
||||
}
|
||||
|
||||
void ProjectPanel::hideEvent(QHideEvent *ev)
|
||||
@ -1069,8 +1064,8 @@ void ProjectPanel::closeEvent(QCloseEvent * ev)
|
||||
|
||||
disconnect(m_panel->treeDockWidget, SIGNAL(topLevelChanged(bool)),
|
||||
this, SLOT(topLevelChangedForTreePanel(bool)));
|
||||
disconnect(m_panel->treeDockWidget, SIGNAL(visibilityChanged(bool)),
|
||||
this, SLOT(visibilityChangedForTreePanel(bool)));
|
||||
// disconnect(m_panel->treeDockWidget, SIGNAL(visibilityChanged(bool)),
|
||||
// this, SLOT(visibilityChangedForTreePanel(bool)));
|
||||
|
||||
saveState();
|
||||
fileClose();
|
||||
@ -1323,11 +1318,16 @@ void ProjectPanel::topLevelChangedForTreePanel(bool f)
|
||||
m_panel->treeDockWidget->setFloating(f);
|
||||
|
||||
if (fwbdebug)
|
||||
qDebug() << "ProjectPanel::topLevelChangedForTreePanel check 1";
|
||||
|
||||
if (!m_panel->treeDockWidget->isWindow())
|
||||
{
|
||||
#if QT_VERSION > 0x040500
|
||||
qDebug() << "ProjectPanel::topLevelChangedForTreePanel check 1";
|
||||
qDebug() << "m_panel->treeDockWidget->isWindow()="
|
||||
<< m_panel->treeDockWidget->isWindow();
|
||||
}
|
||||
|
||||
if ( ! m_panel->treeDockWidget->isWindow())
|
||||
{
|
||||
#if QT_VERSION >= 0x040500
|
||||
if (fwbdebug) qDebug() << "Calling loadMainSplitter()";
|
||||
loadMainSplitter();
|
||||
#endif
|
||||
} else
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user