summaryrefslogtreecommitdiff
path: root/sfx2/source/sidebar/SidebarController.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/sidebar/SidebarController.cxx')
-rw-r--r--sfx2/source/sidebar/SidebarController.cxx20
1 files changed, 18 insertions, 2 deletions
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx
index 6b6bd0d11aa0..db09eea970e8 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -504,14 +504,27 @@ void SidebarController::UpdateConfigurations (void)
}
-
+void SidebarController::RequestSwitchToDeck (
+ const ::rtl::OUString& rsDeckId)
+{
+ maContextChangeUpdate.CancelRequest();
+ maAsynchronousDeckSwitch.RequestCall(
+ ::boost::bind(&SidebarController::OpenThenSwitchToDeck, this, rsDeckId));
+}
void SidebarController::OpenThenSwitchToDeck (
const ::rtl::OUString& rsDeckId)
{
+ // fdo#67627 Clicking a second time on a Deck icon will close the Deck
+ if (IsDeckVisible(rsDeckId))
+ {
+ RequestCloseDeck();
+ return;
+ }
RequestOpenDeck();
SwitchToDeck(rsDeckId);
mpTabBar->Invalidate();
+ mpTabBar->HighlightDeck(rsDeckId);
}
void SidebarController::SwitchToDeck (
@@ -996,7 +1009,10 @@ void SidebarController::RequestOpenDeck (void)
UpdateDeckOpenState();
}
-
+bool SidebarController::IsDeckVisible(const OUString& rsDeckId)
+{
+ return mbIsDeckOpen && mbIsDeckOpen.get() && msCurrentDeckId == rsDeckId;
+}
void SidebarController::UpdateDeckOpenState (void)