diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2024-06-19 13:08:34 +0200 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2024-06-20 05:51:59 +0200 |
commit | daed96f0818b1baae5de8b74b866009d7d89f853 (patch) | |
tree | 8c46a1947575169d363766515bdf9a0d5a51512f /include/sfx2 | |
parent | c2c6a5d32f8c536ab816630583f986860202c4a9 (diff) |
tdf#159835 sfx2: Keep sidebar menu up to date
No longer update the menu for the menu button
in the sidebar in the handler that gets called
when the button gets clicked, but continually
keep the menu up to date instead.
This ensures that the menu is up-to-date when
it gets shown. Updating the menu in the button handler
is too late since
commit f075fa01cb4f74185f13eb0a8d7f84cf1f47af49
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Tue Aug 22 10:26:32 2023 +0200
tdf#141101 tdf#101886 a11y: Restore previous focus on col/line popup close
, as the handler is now no more called before the menu
gets shown.
Do the update in method `TabBar::UpdateMenus` instead
and call that one whenever items change or the
sidebar gets docked/undocked, as menu entries
are shown for the items and for (un)docking.
This makes the menu show all entries again
when opened the first time after starting Writer,
which was no longer the case after the
above-mentioned commmit.
Change-Id: I9a7e341e88d2de5f34e8f85ebada3ff2ebf6b47d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169196
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'include/sfx2')
-rw-r--r-- | include/sfx2/sidebar/TabBar.hxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/sfx2/sidebar/TabBar.hxx b/include/sfx2/sidebar/TabBar.hxx index 7591aeff7bf6..8778c9bd2e21 100644 --- a/include/sfx2/sidebar/TabBar.hxx +++ b/include/sfx2/sidebar/TabBar.hxx @@ -73,6 +73,8 @@ public: /// Enables/Disables the menu button. Used by LoKit. void EnableMenuButton(const bool bEnable); + void UpdateMenus(); + virtual FactoryFunction GetUITestFactory() const override; private: css::uno::Reference<css::frame::XFrame> mxFrame; @@ -111,8 +113,6 @@ private: css::uno::Reference<css::graphic::XGraphic> GetItemImage(const DeckDescriptor& rDeskDescriptor) const; void UpdateButtonIcons(); - DECL_LINK(OnToolboxClicked, weld::Toggleable&, void); - SidebarController& mrParentSidebarController; }; |