summaryrefslogtreecommitdiffstats
path: root/sfx2
diff options
context:
space:
mode:
authorTrent MacAlpine <tmacalp@gmail.com>2015-01-18 13:32:16 -0500
committerJan Holesovsky <kendy@collabora.com>2015-01-19 09:04:27 +0000
commit592984cea1a9cc545358b8d6077113a658834aa5 (patch)
tree1f9846511ac410a0b7e30c4acdf18a68eca02434 /sfx2
parentfdo#87217 Inconsistent floating sidebar close behavior (diff)
downloadcore-592984cea1a9cc545358b8d6077113a658834aa5.tar.gz
core-592984cea1a9cc545358b8d6077113a658834aa5.zip
fdo#88241 Floating sidebar second call to same item should dismiss it
Note that this was written to be used in combination with commit 304e2002a053e9eb54e36462165eca831da8aeb2 to give back the behavior of calling and dismissing the styles and formatting dialog. Change-Id: Ic05db180425b0a2dcd05774b6fa0227b01464731 Reviewed-on: https://gerrit.libreoffice.org/13980 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/sidebar/SidebarController.cxx13
1 files changed, 11 insertions, 2 deletions
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx
index 60b61c4dbd62..b8a87338c0d1 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -489,8 +489,17 @@ void SidebarController::OpenThenSwitchToDeck (
// fdo#67627 Clicking a second time on a Deck icon will close the Deck
if (IsDeckVisible(rsDeckId))
{
- RequestCloseDeck();
- return;
+ // fdo#88241 Summoning an undocked sidebar a second time should close sidebar
+ if (!GetSplitWindow())
+ {
+ mpParentWindow->Close();
+ return;
+ }
+ else
+ {
+ RequestCloseDeck();
+ return;
+ }
}
RequestOpenDeck();
SwitchToDeck(rsDeckId);