Also clear the overlay internals when floating an overlay

Fixes a crash.

Relates to #162
This commit is contained in:
Sergio Martins
2021-02-05 16:29:27 +00:00
parent f1e4f7ecda
commit 621c3dbeca
5 changed files with 28 additions and 8 deletions

View File

@@ -66,8 +66,10 @@ public:
Q_EMIT q->isFloatingChanged(checked);
// When floating, we remove from the sidebar
if (checked && q->isOpen()) {
if (SideBar *sb = DockRegistry::self()->sideBarForDockWidget(q))
if (SideBar *sb = DockRegistry::self()->sideBarForDockWidget(q)) {
sb->mainWindow()->clearSideBarOverlay(/* deleteFrame=*/false);
sb->removeDockWidget(q);
}
}
});