diff options
author | Orgad Shaneh <orgad.shaneh@audiocodes.com> | 2023-09-26 09:45:52 +0300 |
---|---|---|
committer | Orgad Shaneh <orgads@gmail.com> | 2023-09-26 09:33:33 +0000 |
commit | 1c24ef6406d56c4e5e45741caf5ea023ae5f9f31 (patch) | |
tree | f82bac42574d917ee6df66fe068064dc67853716 /src/plugins/welcome | |
parent | 4e101b42238a3c2f421def62af33cb7e32adbf55 (diff) |
Welcome: Fix initial display of side area
If the main window un-maximized size is small (below the threshold for
hiding the side area) and the maximized size is large, the resizeEvent
is called twice - once with the original size, and then on show, it is
called again with the maximized size.
The second call (with the delayed QTimer::singleShot), is called after
delayedInitialize() is done, so the side area remains hidden for a few
seconds before it reappears.
The commit that exposed this behavior is 0b85fc5aa0, which changed the
expensive toolchain loading to happen in delayedInitialize.
Solve this by emitting the signal only after the widget is visible.
Change-Id: I0ad2c16a42742046da6847a5f108b797f91fabff
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Diffstat (limited to 'src/plugins/welcome')
-rw-r--r-- | src/plugins/welcome/welcomeplugin.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/welcome/welcomeplugin.cpp b/src/plugins/welcome/welcomeplugin.cpp index 8cc8165aa2..230dd27b93 100644 --- a/src/plugins/welcome/welcomeplugin.cpp +++ b/src/plugins/welcome/welcomeplugin.cpp @@ -80,7 +80,8 @@ signals: void ResizeSignallingWidget::resizeEvent(QResizeEvent *event) { - emit resized(event->size(), event->oldSize()); + if (isVisible()) + emit resized(event->size(), event->oldSize()); } class WelcomeMode : public IMode |