sc/source/ui/cctrl/checklistmenu.cxx |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit fad8dd780df8374ceb5c4c60ffc08d793f34651f
Author:     Szymon Kłos <szymon.k...@collabora.com>
AuthorDate: Wed Jan 6 12:38:40 2021 +0100
Commit:     Szymon Kłos <szymon.k...@collabora.com>
CommitDate: Wed Mar 3 16:27:10 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 <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Szymon Kłos <szymon.k...@collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111895
    Tested-by: Jenkins

diff --git a/sc/source/ui/cctrl/checklistmenu.cxx 
b/sc/source/ui/cctrl/checklistmenu.cxx
index 19c098a8d96e..9bbfa731f27c 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -131,6 +131,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);
@@ -179,6 +180,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);
@@ -458,6 +460,7 @@ 
ScCheckListMenuControl::ScCheckListMenuControl(ScCheckListMenuWindow* pParent, v
 {
     mxTreeChecks->set_clicks_to_toggle(1);
     mxListChecks->set_clicks_to_toggle(1);
+    mxMenu->hide(); // show only when has items
 
     /*
        tdf#136559 If we have no dates we don't need a tree
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to