From add106c57dfed87924703b847cb09b6924cc92df Mon Sep 17 00:00:00 2001 From: kateleet Date: Sun, 26 Dec 2021 21:23:58 +0800 Subject: [PATCH] fix(trash): menu options --- model/foldermodel.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/model/foldermodel.cpp b/model/foldermodel.cpp index afe34ab..21ed5ad 100644 --- a/model/foldermodel.cpp +++ b/model/foldermodel.cpp @@ -1787,7 +1787,9 @@ void FolderModel::updateActions() } if (QAction *terminal = m_actionCollection.action("wallpaper")) { - terminal->setVisible(items.size() == 1 && supportSetAsWallpaper(items.first().mimetype())); + terminal->setVisible(items.size() == 1 && + !isTrash && + supportSetAsWallpaper(items.first().mimetype())); } if (QAction *properties = m_actionCollection.action("properties")) { @@ -1795,6 +1797,7 @@ void FolderModel::updateActions() } if (QAction *showHidden = m_actionCollection.action("showHidden")) { + showHidden->setVisible(!isTrash); showHidden->setCheckable(true); showHidden->setChecked(m_showHiddenFiles); }