[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - sc/source
Szymon KÅos (via logerrit)
logerrit at kemper.freedesktop.org
Wed Jan 6 12:16:29 UTC 2021
sc/source/ui/cctrl/checklistmenu.cxx | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit 59a3232069e390b908ef1a6da8e98ba54fbc2f43
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Wed Jan 6 12:38:40 2021 +0100
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Wed Jan 6 13:15:55 2021 +0100
autofilter: show menu only if has items
Change-Id: Ie6b7158e74a8bdccdbafaa9b6d9b09b3796088ba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108846
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx
index c913d8ddfb00..526a277c6af3 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -133,6 +133,7 @@ void ScCheckListMenuControl::addMenuItem(const OUString& rText, Action* pAction)
aItem.mxAction.reset(pAction);
maMenuItems.emplace_back(std::move(aItem));
+ mxMenu->show();
mxMenu->append_text(rText);
if (mbCanHaveSubMenu)
mxMenu->set_image(mxMenu->n_children() - 1, css::uno::Reference<css::graphic::XGraphic>(), 1);
@@ -181,6 +182,7 @@ ScCheckListMenuWindow* ScCheckListMenuControl::addSubMenuItem(const OUString& rT
pNotifier));
maMenuItems.emplace_back(std::move(aItem));
+ mxMenu->show();
mxMenu->append_text(rText);
if (mbCanHaveSubMenu)
mxMenu->set_image(mxMenu->n_children() - 1, *mxDropDown, 1);
@@ -466,6 +468,8 @@ ScCheckListMenuControl::ScCheckListMenuControl(ScCheckListMenuWindow* pParent, v
, maOpenTimer(this)
, maCloseTimer(this)
{
+ mxMenu->hide(); // show only when has items
+
/*
tdf#136559 If we have no dates we don't need a tree
structure, just a list. GtkListStore can be then
More information about the Libreoffice-commits
mailing list