diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2019-04-11 15:34:13 +0200 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2019-04-12 08:17:11 +0200 |
commit | b5fdb148fe87a90f3e586efcea7aa6ef865fa42a (patch) | |
tree | 6d6165702059bd39cea362381c22bf6f8bbae697 /sfx2 | |
parent | 735964c39097ff952fcaffee6b35c79e210c019c (diff) |
tdf#124654 Don't reopen closed sidebar decks
NotifyResize was called after a deck was closed,
so this is the wrong place to ensure minimum sidebar width.
Change-Id: I5a03dc1ee24257d49673db58bffbda1a7358cf3a
Reviewed-on: https://gerrit.libreoffice.org/70597
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/sidebar/SidebarController.cxx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx index c9958afbe388..e15415fae421 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -553,6 +553,13 @@ void SidebarController::OpenThenToggleDeck ( } RequestOpenDeck(); SwitchToDeck(rsDeckId); + + // Make sure the sidebar is wide enough to fit the requested content + sal_Int32 nRequestedWidth = (mpCurrentDeck->GetMinimalWidth() + TabBar::GetDefaultWidth()) + * mpTabBar->GetDPIScaleFactor(); + if (mnSavedSidebarWidth < nRequestedWidth) + SetChildWindowWidth(nRequestedWidth); + mpTabBar->Invalidate(); mpTabBar->HighlightDeck(rsDeckId); collectUIInformation(rsDeckId); @@ -1223,10 +1230,6 @@ void SidebarController::RestrictWidth (sal_Int32 nWidth) const sal_Int32 nRequestedWidth = (TabBar::GetDefaultWidth() + nWidth) * mpTabBar->GetDPIScaleFactor(); - // Make sure the sidebar is wide enough to fit the requested content - if (pSplitWindow->GetSizePixel().Width() < nRequestedWidth) - SetChildWindowWidth(nRequestedWidth); - pSplitWindow->SetItemSizeRange( nSetId, Range(nRequestedWidth, |