-
Notifications
You must be signed in to change notification settings - Fork 678
Description
During application start before any Window is show I add several widgets like this:
auto currentArea = dockManager->focusedDockWidget() ? dockManager->focusedDockWidget()->dockAreaWidget() : Q_NULLPTR;
dockManager->addDockWidget(ads::CenterDockWidgetArea, myNewDockWidget, currentArea);And it shows up in a single dock area:
I updated to the latest master (df1fa27) and I now get this behavior. Each new widget shows up in a new area because currentArea is null.
I traced it down to e836b15 specifically the part the adds this extra condition && (d->focusController()->focusedDockArea() == this->dockAreaWidget())
If I take that back out then the startup works as expected. I haven't looked at the original issue the commit was fixing but not sure if this needs an additional check or something.
My assumption is since d->focusController()->setDockWidgetTabFocused(this); is not getting called, nothing gets focus especially before any window is shown, thus causing my code to add it to a "null" area.
If you have suggestions, I can try out any ideas since I can reproduce it so easily.
Thank you for all your effort with this library. As an open-source maintainer myself I understand the time and effort it takes.

