Skip to content

Commit

Permalink
Gui: Remove redundant overlay header
Browse files Browse the repository at this point in the history
Fixes: #13349
  • Loading branch information
kadet1090 authored and yorikvanhavre committed May 6, 2024
1 parent d89bece commit 075f387
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Gui/OverlayManager.cpp
Expand Up @@ -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);
}

Expand Down

0 comments on commit 075f387

Please sign in to comment.