diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2021-01-06 12:38:40 +0100 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2021-01-06 13:15:55 +0100 |
commit | 59a3232069e390b908ef1a6da8e98ba54fbc2f43 (patch) | |
tree | 278ca6b6ba8fb0c129c9b3c7effed328132d8018 | |
parent | a4aa110f2ffd2b9439a1bcb5abcacf7704ff41a4 (diff) |
autofilter: show menu only if has items
Change-Id: Ie6b7158e74a8bdccdbafaa9b6d9b09b3796088ba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108846
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
-rw-r--r-- | sc/source/ui/cctrl/checklistmenu.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
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 |