From 592984cea1a9cc545358b8d6077113a658834aa5 Mon Sep 17 00:00:00 2001 From: Trent MacAlpine Date: Sun, 18 Jan 2015 13:32:16 -0500 Subject: 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 Tested-by: Jan Holesovsky --- sfx2/source/sidebar/SidebarController.cxx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'sfx2') 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); -- cgit