core: qt layout ui: ux/ui: fixes #26048 keep workbench selector visible

This commit is contained in:
chris
2025-12-19 15:08:47 -06:00
committed by Chris Hennes
parent 11de6743b0
commit 0a2a1ca329
2 changed files with 19 additions and 0 deletions

View File

@@ -440,4 +440,22 @@ void WorkbenchTabWidget::adjustSize()
parentWidget()->adjustSize();
}
void WorkbenchComboBox::setVisible(bool visible)
{
if (!visible && parentWidget() && parentWidget()->isVisible()) {
// ignore attempts to hide while parent is visible
// this works around a layout bug when toolbar grip is attached
// in the menu bar area
QTimer::singleShot(0, this, [this]() {
if (auto toolbar = parentWidget()) {
if (auto areaWidget = toolbar->parentWidget()) {
areaWidget->adjustSize();
}
}
});
return;
}
QComboBox::setVisible(visible);
}
#include "moc_WorkbenchSelector.cpp"

View File

@@ -53,6 +53,7 @@ Q_OBJECT // NOLINT
~WorkbenchComboBox() override = default;
WorkbenchComboBox(WorkbenchComboBox&& rhs) = delete;
void showPopup() override;
void setVisible(bool visible) override;
WorkbenchComboBox operator=(WorkbenchComboBox&& rhs) = delete;