]> cloud.milkyroute.net Git - dolphin.git/commitdiff
(search) Keep menu open when selecting tags
authorIsmael Asensio <isma.af@gmail.com>
Sun, 22 Dec 2019 15:59:54 +0000 (16:59 +0100)
committerIsmael Asensio <isma.af@gmail.com>
Mon, 6 Jan 2020 15:03:46 +0000 (16:03 +0100)
Summary:
Keeps the `Tags` menu open while selecting and deselecting tags in the
search panel, saving many mouse clicks for multiple tags.
It cannot be done natively on `QMenu` (https://bugreports.qt.io/browse/QTBUG-6635)
but it is a one-liner and I haven't seen any bad behavior so far.

Test Plan:
{F7853717}

- `Tags` menu does not close when selecting/deselecting tags
- Tag search is consistent
- Clicking anywhere else will close the menu

Reviewers: #dolphin, elvisangelaccio, ngraham, #vdg

Reviewed By: #dolphin, elvisangelaccio, #vdg

Subscribers: #vdg, broulik, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D26343

src/search/dolphinfacetswidget.cpp

index 34719730bee88866b2bcf621175f95434e4069a5..33c3cea2452b90b7a59ad43cf6b36453ce004a95 100644 (file)
@@ -280,6 +280,8 @@ void DolphinFacetsWidget::updateTagsMenuItems(const QUrl&, const KFileItemList&
                 removeSearchTag(tagName);
             }
             emit facetChanged();
+
+            m_tagsSelector->menu()->show();
         });
     }