diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2021-02-12 17:18:51 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2021-03-04 10:56:56 +0100 |
commit | 1299ca78262c0c2eac1ceeb518af6f7bd0f9b8dd (patch) | |
tree | d5265404188a8603d2a19e1303f1d772e1826199 /sfx2 | |
parent | 81e0a4a859d6f47cca9c54482e30be0b7d7355cc (diff) |
sidebar: use real height to determine preffered size
There was a bug causing to crop the sidebar in online:
1. open odt file in 2 sessions
2. select image in session A
3. move mouse over sidebar in session B
4. move mouse over sidebar in session A
Result: sidebar A was cropped
PosSizePropertyPanel on context change
did some windows visibility changes in the meantime.
get_preffered_size() returned lower height than real
value in SidebarPanelBase::getHeightForWidth
call queue_resize to invalidate cached optimal size
Change-Id: I8080259ffb12ae3f6613e7749e908d6ef55c1f3a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110894
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/sidebar/SidebarPanelBase.cxx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sfx2/source/sidebar/SidebarPanelBase.cxx b/sfx2/source/sidebar/SidebarPanelBase.cxx index 0906dc962d57..13287fe3a6f2 100644 --- a/sfx2/source/sidebar/SidebarPanelBase.cxx +++ b/sfx2/source/sidebar/SidebarPanelBase.cxx @@ -161,6 +161,7 @@ ui::LayoutSize SAL_CALL SidebarPanelBase::getHeightForWidth (const sal_Int32 nWi if (isLayoutEnabled(mpControl)) { // widget layout-based sidebar + mpControl->queue_resize(); Size aSize(mpControl->get_preferred_size()); return ui::LayoutSize(aSize.Height(), aSize.Height(), aSize.Height()); } |