[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - sfx2/source
Ashod Nakashian (via logerrit)
logerrit at kemper.freedesktop.org
Mon Nov 25 12:38:03 UTC 2019
sfx2/source/sidebar/SidebarController.cxx | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
New commits:
commit 5c43becf829b13109a50cdd2276fe4437ec27143
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Sat Nov 23 19:10:45 2019 -0500
Commit: Ashod Nakashian <ashnakash at gmail.com>
CommitDate: Mon Nov 25 13:37:17 2019 +0100
Revert "sidebar: don't switch the deck when unchanged"
This approach doesn't work when changing the context, since
the Deck 'type' hasn't changed, but the contents have.
A better way to handle the original recursive high-cpu issue is
by avoiding sending/processing duplicate Deck 'created' notifications
(in a follow-up patch).
This reverts commit b78bb32e743cb1a24e7e8f5e76f01af5441ef956.
Change-Id: I10e58d2fbfa899d21bf92306722cb7148ac4a571
Reviewed-on: https://gerrit.libreoffice.org/83628
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx
index a7fe0e26d302..a43ee91afdcd 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -131,7 +131,7 @@ SidebarController::SidebarController (
this)),
maCurrentContext(OUString(), OUString()),
maRequestedContext(),
- mnRequestedForceFlags(SwitchFlag_ForceNewDeck | SwitchFlag_ForceNewPanels),
+ mnRequestedForceFlags(SwitchFlag_NoForce),
msCurrentDeckId(gsDefaultDeckId),
maPropertyChangeForwarder([this](){ return this->BroadcastPropertyChange(); }),
maContextChangeUpdate([this](){ return this->UpdateConfigurations(); }),
@@ -567,7 +567,12 @@ void SidebarController::UpdateConfigurations()
// with the deck.
mpTabBar->HighlightDeck(sNewDeckId);
- SwitchToDeck(sNewDeckId);
+ std::shared_ptr<DeckDescriptor> xDescriptor = mpResourceManager->GetDeckDescriptor(sNewDeckId);
+
+ if (xDescriptor)
+ {
+ SwitchToDeck(*xDescriptor, maCurrentContext);
+ }
}
namespace {
More information about the Libreoffice-commits
mailing list