[Libreoffice-commits] core.git: vcl/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Sat Jan 11 14:01:25 UTC 2020
vcl/source/app/salvtables.cxx | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
New commits:
commit c000c6026d2b3286d2aaebc903e5cf65a06be286
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Jan 10 16:27:55 2020 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Sat Jan 11 15:00:55 2020 +0100
send signal_toggle_menu on set_menu_item_active
so we can populate the popover when that happens
Change-Id: I969a17093655f0018bccf51e707480480dd13fb5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86561
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 0dd8825754dc..7cb974d90635 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -1001,6 +1001,12 @@ public:
sal_uInt16 nItemId = m_xToolBox->GetItemId(OUString::fromUtf8(rIdent));
assert (m_xToolBox->GetItemBits(nItemId) & ToolBoxItemBits::DROPDOWN);
+ if (bActive)
+ {
+ m_sStartShowIdent = m_xToolBox->GetItemCommand(nItemId).toUtf8();
+ signal_toggle_menu(m_sStartShowIdent);
+ }
+
auto pFloat = m_aFloats[nItemId];
if (pFloat)
{
@@ -1020,6 +1026,8 @@ public:
else
pPopup->EndExecute();
}
+
+ m_sStartShowIdent.clear();
}
bool get_menu_item_active(const OString& rIdent) const override
@@ -1174,11 +1182,7 @@ IMPL_LINK_NOARG(SalInstanceToolbar, ClickHdl, ToolBox*, void)
IMPL_LINK_NOARG(SalInstanceToolbar, DropdownClick, ToolBox*, void)
{
sal_uInt16 nItemId = m_xToolBox->GetCurItemId();
-
- m_sStartShowIdent = m_xToolBox->GetItemCommand(nItemId).toUtf8();
- signal_toggle_menu(m_sStartShowIdent);
- set_menu_item_active(m_sStartShowIdent, true);
- m_sStartShowIdent.clear();
+ set_menu_item_active(m_xToolBox->GetItemCommand(nItemId).toUtf8(), true);
}
IMPL_LINK(SalInstanceToolbar, MenuToggleListener, VclWindowEvent&, rEvent, void)
More information about the Libreoffice-commits
mailing list