sc/source/ui/cctrl/checklistmenu.cxx | 4 ++++ 1 file changed, 4 insertions(+)
New commits: commit 59a3232069e390b908ef1a6da8e98ba54fbc2f43 Author: Szymon Kłos <[email protected]> AuthorDate: Wed Jan 6 12:38:40 2021 +0100 Commit: Szymon Kłos <[email protected]> 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 <[email protected]> Reviewed-by: Szymon Kłos <[email protected]> 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 _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
