mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-12-25 07:31:33 +08:00
Added test for dock manager flag EqualSplitOnInsertion to demo aplication
This commit is contained in:
parent
70738f7549
commit
6eb497fb64
@ -166,6 +166,7 @@ struct MainWindowPrivate
|
|||||||
QComboBox* PerspectiveComboBox = nullptr;
|
QComboBox* PerspectiveComboBox = nullptr;
|
||||||
ads::CDockManager* DockManager = nullptr;
|
ads::CDockManager* DockManager = nullptr;
|
||||||
ads::CDockWidget* WindowTitleTestDockWidget = nullptr;
|
ads::CDockWidget* WindowTitleTestDockWidget = nullptr;
|
||||||
|
ads::CDockWidget* LastDockedEditor = nullptr;
|
||||||
|
|
||||||
MainWindowPrivate(CMainWindow* _public) : _this(_public) {}
|
MainWindowPrivate(CMainWindow* _public) : _this(_public) {}
|
||||||
|
|
||||||
@ -720,7 +721,17 @@ void CMainWindow::createEditor()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
d->DockManager->addDockWidget(ads::TopDockWidgetArea, DockWidget);
|
ads::CDockAreaWidget* EditorArea = d->LastDockedEditor ? d->LastDockedEditor->dockAreaWidget() : nullptr;
|
||||||
|
if (EditorArea)
|
||||||
|
{
|
||||||
|
d->DockManager->setConfigFlag(ads::CDockManager::EqualSplitOnInsertion, true);
|
||||||
|
d->DockManager->addDockWidget(ads::RightDockWidgetArea, DockWidget, EditorArea);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
d->DockManager->addDockWidget(ads::TopDockWidgetArea, DockWidget);
|
||||||
|
}
|
||||||
|
d->LastDockedEditor = DockWidget;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user