Remove from the sidebar when floating a widget

Fixes #162
This commit is contained in:
Sergio Martins
2021-02-05 12:05:52 +00:00
parent 894e0fd03a
commit 249d1b6790
2 changed files with 5 additions and 1 deletions

View File

@@ -64,6 +64,11 @@ public:
}
Q_EMIT q->isFloatingChanged(checked);
// When floating, we remove from the sidebar
if (checked && q->isOpen()) {
if (SideBar *sb = DockRegistry::self()->sideBarForDockWidget(q))
sb->removeDockWidget(q);
}
});
toggleAction->setCheckable(true);