committed by
Yorik van Havre
parent
a2037c9dc4
commit
330c7f4eaa
@@ -1594,15 +1594,19 @@ void OverlayManager::onDockVisibleChange(bool visible)
|
||||
void OverlayManager::onDockFeaturesChange(QDockWidget::DockWidgetFeatures features)
|
||||
{
|
||||
Q_UNUSED(features);
|
||||
|
||||
auto dw = qobject_cast<QDockWidget*>(sender());
|
||||
if (!dw)
|
||||
|
||||
if (!dw) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Rebuild the title widget as it may have a different set of buttons shown.
|
||||
if (QWidget *titleBarWidget = dw->titleBarWidget()) {
|
||||
if (auto *titleBarWidget = qobject_cast<OverlayTitleBar*>(dw->titleBarWidget())) {
|
||||
dw->setTitleBarWidget(nullptr);
|
||||
delete titleBarWidget;
|
||||
}
|
||||
|
||||
setupTitleBar(dw);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user