]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Fix a bug where "Add to Places" remains disabled
authorAlex Miranda <amdev1@yandex.com>
Sun, 20 Oct 2019 10:03:10 +0000 (12:03 +0200)
committerElvis Angelaccio <elvis.angelaccio@kde.org>
Sun, 20 Oct 2019 10:03:10 +0000 (12:03 +0200)
Summary:
Fix a bug where "Add to Places" doesn't get re-enabled in the context
and file menus when nothing is selected after previously selecting a
single file that is not a directory or multiple files.

Test Plan: Verify the action remains enabled when appropiate

Reviewers: #dolphin, elvisangelaccio, meven

Reviewed By: meven

Subscribers: meven, kfm-devel

Tags: #dolphin

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

src/dolphinmainwindow.cpp

index ce1746d2b78c8ecbcae90db4b4819a00ef00bc66..17d9901f9b6c02315fac3ca0d97c4d8d2436275a 100644 (file)
@@ -1808,6 +1808,7 @@ void DolphinMainWindow::updateFileAndEditActions()
     if (list.isEmpty()) {
         stateChanged(QStringLiteral("has_no_selection"));
 
+        addToPlacesAction->setEnabled(true);
         addToPlacesAction->setText(i18nc("@action:inmenu Add current folder to places", "Add '%1' to Places", m_activeViewContainer->placesText()));
     } else {
         stateChanged(QStringLiteral("has_selection"));