summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2015-08-30 22:35:00 +0300
committerCaolán McNamara <caolanm@redhat.com>2015-09-02 11:18:10 +0000
commit6390640fcce39eaf7612bcbd8f61e2570c3e50e7 (patch)
treefc32a3738004528115203157f82259d47d4e3fe3 /sfx2
parent56e49887e0c348297f9c75bb9eb5497b39f9fbfa (diff)
tdf#83546 Expand the sidebar if it's hidden
Change-Id: I92620cb1439bd13efcdbafcdc584abd8d7bb4345 (cherry picked from commit e38c4105077b396b0b53e0296ae9cf142f51dd52) Reviewed-on: https://gerrit.libreoffice.org/18245 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/sidebar/SidebarController.cxx23
1 files changed, 11 insertions, 12 deletions
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx
index 4115e884e5c5..9afa3f5ae03d 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -455,20 +455,19 @@ void SidebarController::UpdateConfigurations()
void SidebarController::OpenThenSwitchToDeck (
const ::rtl::OUString& rsDeckId)
{
- // fdo#67627 Clicking a second time on a Deck icon will close the Deck
- if (IsDeckVisible(rsDeckId))
+ SfxSplitWindow* pSplitWindow = GetSplitWindow();
+ if ( pSplitWindow && !pSplitWindow->IsFadeIn() )
+ // tdf#83546 Collapsed sidebar should expand first
+ pSplitWindow->FadeIn();
+ else if ( IsDeckVisible( rsDeckId ) )
{
- // fdo#88241 Summoning an undocked sidebar a second time should close sidebar
- if (!GetSplitWindow())
- {
- mpParentWindow->Close();
- return;
- }
- else
- {
+ if ( pSplitWindow )
+ // tdf#67627 Clicking a second time on a Deck icon will close the Deck
RequestCloseDeck();
- return;
- }
+ else
+ // tdf#88241 Summoning an undocked sidebar a second time should close sidebar
+ mpParentWindow->Close();
+ return;
}
RequestOpenDeck();
SwitchToDeck(rsDeckId);