mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-11-15 13:15:43 +08:00
Fixed emission of missing top level event when redocking a auto hide widget
This commit is contained in:
parent
e1368be645
commit
44a5873415
@ -379,7 +379,17 @@ void CAutoHideDockContainer::moveContentsToParent()
|
||||
// location like it had as a auto hide widget. This brings the least surprise
|
||||
// to the user and he does not have to search where the widget was inserted.
|
||||
d->DockWidget->setDockArea(nullptr);
|
||||
dockContainer()->addDockWidget(d->getDockWidgetArea(d->SideTabBarArea), d->DockWidget);
|
||||
auto DockContainer = dockContainer();
|
||||
|
||||
// If the container contained only one visible dock widget, the we need
|
||||
// to emit a top level event for this widget because it is not the one and
|
||||
// only visible docked widget anymore
|
||||
auto TopLevelDockWidget = DockContainer->topLevelDockWidget();
|
||||
DockContainer->addDockWidget(d->getDockWidgetArea(d->SideTabBarArea), d->DockWidget);
|
||||
if (TopLevelDockWidget)
|
||||
{
|
||||
CDockWidget::emitTopLevelEventForWidget(TopLevelDockWidget, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user