mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-12-25 07:31:33 +08:00
Improve CDockManager::addDockWidgetTab() for dynamically added widgets
This commit is contained in:
parent
69894f3f88
commit
5ee94d7602
@ -565,9 +565,13 @@ CDockAreaWidget* CDockManager::addDockWidgetTab(DockWidgetArea area,
|
||||
{
|
||||
return addDockWidget(ads::CenterDockWidgetArea, Dockwidget, AreaWidget);
|
||||
}
|
||||
else if (!openedDockAreas().isEmpty())
|
||||
{
|
||||
return addDockWidget(area, Dockwidget, openedDockAreas().last());
|
||||
}
|
||||
else
|
||||
{
|
||||
return addDockWidget(area, Dockwidget, AreaWidget);
|
||||
return addDockWidget(area, Dockwidget, nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user