diff options
author | Norwegian Rock Cat <qt-info@nokia.com> | 2009-07-07 14:46:30 (GMT) |
---|---|---|
committer | Norwegian Rock Cat <qt-info@nokia.com> | 2009-07-07 14:53:17 (GMT) |
commit | f37bd111f7622a34b3a7bd63f5a82f6042dc0f0d (patch) | |
tree | 239947cc3c5b5b57a3afbb02b082e306570b9f71 | |
parent | 20b2c6bd8e6f6a7ef384f4b478623768c11e01ae (diff) | |
download | Qt-f37bd111f7622a34b3a7bd63f5a82f6042dc0f0d.zip Qt-f37bd111f7622a34b3a7bd63f5a82f6042dc0f0d.tar.gz Qt-f37bd111f7622a34b3a7bd63f5a82f6042dc0f0d.tar.bz2 |
Stop showing then hiding windows on starting designer in top-level mode.
We've had this since 4.5 and it's very annoying to see the window show
and quickly hide itself. I was hoping it wasn't a bug in Qt, and it
turns it isn't and it was happening on all platforms.
Reviewed-by: Friedemann Kleint
Shout outs: João for testing.
-rw-r--r-- | tools/designer/src/designer/qdesigner_workbench.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/designer/src/designer/qdesigner_workbench.cpp b/tools/designer/src/designer/qdesigner_workbench.cpp index 923687a2..ce8dde6 100644 --- a/tools/designer/src/designer/qdesigner_workbench.cpp +++ b/tools/designer/src/designer/qdesigner_workbench.cpp @@ -462,8 +462,7 @@ void QDesignerWorkbench::switchToTopLevelMode() // make sure that the widgetbox is visible if it is different from neutral. QDesignerToolWindow *widgetBoxWrapper = widgetBoxToolWindow(); Q_ASSERT(widgetBoxWrapper); - if (!widgetBoxWrapper->action()->isChecked()) - widgetBoxWrapper->action()->trigger(); + const bool needWidgetBoxWrapperVisible = widgetBoxWrapper->action()->isChecked(); switchToNeutralMode(); const QPoint desktopOffset = desktopGeometry().topLeft(); @@ -502,7 +501,7 @@ void QDesignerWorkbench::switchToTopLevelMode() found_visible_window |= tw->isVisible(); } - if (!widgetBoxWrapper->action()->isChecked()) + if (needWidgetBoxWrapperVisible) widgetBoxWrapper->action()->trigger(); if (!m_toolWindows.isEmpty() && !found_visible_window) |