fix: cut option enabled
This commit is contained in:
parent
6f7c03b9f5
commit
9c5b3bc3cd
1 changed files with 4 additions and 0 deletions
|
@ -1011,6 +1011,9 @@ void FolderModel::openSelected()
|
||||||
if (!m_selectionModel->hasSelection())
|
if (!m_selectionModel->hasSelection())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (resolvedUrl().scheme() == QLatin1String("trash"))
|
||||||
|
return;
|
||||||
|
|
||||||
const QList<QUrl> urls = selectedUrls();
|
const QList<QUrl> urls = selectedUrls();
|
||||||
if (!m_isDesktop) {
|
if (!m_isDesktop) {
|
||||||
if (urls.size() == 1 && KFileItem(urls.first()).isDir()) {
|
if (urls.size() == 1 && KFileItem(urls.first()).isDir()) {
|
||||||
|
@ -1875,6 +1878,7 @@ void FolderModel::updateActions()
|
||||||
|
|
||||||
if (QAction *cutAction = m_actionCollection.action(QStringLiteral("cut"))) {
|
if (QAction *cutAction = m_actionCollection.action(QStringLiteral("cut"))) {
|
||||||
cutAction->setVisible(!isTrash);
|
cutAction->setVisible(!isTrash);
|
||||||
|
cutAction->setEnabled(rootItem().isWritable());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (QAction *restoreAction = m_actionCollection.action(QStringLiteral("restore"))) {
|
if (QAction *restoreAction = m_actionCollection.action(QStringLiteral("restore"))) {
|
||||||
|
|
Loading…
Reference in a new issue