Kaydet (Commit) b5fdb148 authored tarafından Samuel Mehrbrodt's avatar Samuel Mehrbrodt

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: 's avatarSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
üst 735964c3
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment