diff options
author | Ilhan Yesil <ilhanyesil@gmx.de> | 2020-11-12 15:33:24 +0100 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2021-01-25 09:53:04 +0100 |
commit | 12403996d2356bc40c89c37a9fbe2a727180bf83 (patch) | |
tree | b4c525f1a21a9ef71d98ca14d26094e0486d515c | |
parent | f7652efbe8b945479a8bdf6dcd9ea2c59ecdee4b (diff) |
tdf#138160 Set minimal width of sidebar tabpage after UNO call
Call OpenThenToggleDeck in SidebarController instead SwitchToDeck
to ensure the minimal width of the tabpage is considered and
the width of the sidebar is set correctly.
Change-Id: I27c21572b5c648b3ddbb4d908d40af686ac87a9a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105758
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
(cherry picked from commit 7206de4f3d9eecdcbdd98294fa50f01c4c9ece9c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109797
Tested-by: Michael Weghorn <m.weghorn@posteo.de>
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
-rw-r--r-- | sfx2/source/sidebar/UnoDeck.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sfx2/source/sidebar/UnoDeck.cxx b/sfx2/source/sidebar/UnoDeck.cxx index 9a77c064b3e3..cf4b3a6a9228 100644 --- a/sfx2/source/sidebar/UnoDeck.cxx +++ b/sfx2/source/sidebar/UnoDeck.cxx @@ -95,13 +95,16 @@ void SAL_CALL SfxUnoDeck::activate( const sal_Bool bActivate ) SidebarController* pSidebarController = getSidebarController(); + // tdf#138160: OpenThenToggleDeck takes care of minimal width if (bActivate) - pSidebarController->SwitchToDeck(mDeckId); + pSidebarController->OpenThenToggleDeck(mDeckId); else + { pSidebarController->SwitchToDefaultDeck(); + // update the sidebar + pSidebarController->NotifyResize(); + } - // update the sidebar - pSidebarController->NotifyResize(); } uno::Reference<ui::XPanels> SAL_CALL SfxUnoDeck::getPanels() |