From d2d39047edcc41ad5daee94f827da87fad9683d0 Mon Sep 17 00:00:00 2001 From: kateleet Date: Tue, 28 Dec 2021 14:15:20 +0800 Subject: [PATCH] fix(menu): empty trash option visible --- model/foldermodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/foldermodel.cpp b/model/foldermodel.cpp index 7eee901..61b7218 100644 --- a/model/foldermodel.cpp +++ b/model/foldermodel.cpp @@ -1864,7 +1864,7 @@ void FolderModel::updateActions() } if (QAction *emptyTrash = m_actionCollection.action("emptyTrash")) { - emptyTrash->setVisible(isTrash); + emptyTrash->setVisible(isTrash && rowCount() > 0); } if (QAction *del = m_actionCollection.action(QStringLiteral("del"))) {