mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-12-25 23:51:33 +08:00
Simplify logic when restoring state
This commit is contained in:
parent
b950b8a209
commit
9a69955124
@ -1099,22 +1099,7 @@ bool DockContainerWidgetPrivate::restoreOverlayDockArea(CDockingStateReader& s,
|
||||
_this->sideTabBar(area)->insertSideTab(0, DockWidget->sideTabWidget());
|
||||
DockArea->overlayDockContainer()->addDockWidget(DockWidget);
|
||||
DockWidget->sideTabWidget()->updateStyle(); // Needed as the side tab widget get it's left/right property from the overlay dock container which was just added
|
||||
DockWidget->toggleView(Closed);
|
||||
}
|
||||
|
||||
if (Testing)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!DockArea->dockWidgetsCount())
|
||||
{
|
||||
delete DockArea;
|
||||
DockArea = nullptr;
|
||||
}
|
||||
else
|
||||
{
|
||||
DockArea->setProperty("currentDockWidget", CurrentDockWidget);
|
||||
DockArea->overlayDockContainer()->toggleView(!Closed);
|
||||
}
|
||||
|
||||
return true;
|
||||
@ -1913,6 +1898,8 @@ QList<CDockAreaWidget*> CDockContainerWidget::openedDockAreas() const
|
||||
//============================================================================
|
||||
QList<CDockWidget*> CDockContainerWidget::openedDockWidgets() const
|
||||
{
|
||||
// todo: cleanup
|
||||
qInfo() << "Opened Dock Widgets: ";
|
||||
QList<CDockWidget*> DockWidgetList;
|
||||
for (auto DockArea : d->DockAreas)
|
||||
{
|
||||
@ -1922,6 +1909,12 @@ QList<CDockWidget*> CDockContainerWidget::openedDockWidgets() const
|
||||
}
|
||||
}
|
||||
|
||||
// todo: cleanup
|
||||
for (auto dockWidget : DockWidgetList)
|
||||
{
|
||||
qInfo() << "Opened dock widgets: " << dockWidget->objectName();
|
||||
}
|
||||
|
||||
return DockWidgetList;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user