Added test for dock manager flag EqualSplitOnInsertion to demo aplication

This commit is contained in:
Uwe Kindler 2020-09-03 15:22:43 +02:00
parent 70738f7549
commit 6eb497fb64

View File

@ -166,6 +166,7 @@ struct MainWindowPrivate
QComboBox* PerspectiveComboBox = nullptr;
ads::CDockManager* DockManager = nullptr;
ads::CDockWidget* WindowTitleTestDockWidget = nullptr;
ads::CDockWidget* LastDockedEditor = nullptr;
MainWindowPrivate(CMainWindow* _public) : _this(_public) {}
@ -719,9 +720,19 @@ void CMainWindow::createEditor()
FloatingWidget->move(QPoint(20, 20));
}
else
{
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;
}
}