┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/kfileitemmodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/kitemviews/kfileitemmodel.cpp')
-rw-r--r--src/kitemviews/kfileitemmodel.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/kitemviews/kfileitemmodel.cpp b/src/kitemviews/kfileitemmodel.cpp
index 1c48b2275..c08f8e964 100644
--- a/src/kitemviews/kfileitemmodel.cpp
+++ b/src/kitemviews/kfileitemmodel.cpp
@@ -1150,7 +1150,14 @@ void KFileItemModel::slotItemsDeleted(const KFileItemList& items)
indexesToRemove.reserve(items.count());
KFileItemList dirsChanged;
+ const auto currentDir = directory();
+
for (const KFileItem& item : items) {
+ if (item.url() == currentDir) {
+ Q_EMIT currentDirectoryRemoved();
+ return;
+ }
+
const int indexForItem = index(item);
if (indexForItem >= 0) {
indexesToRemove.append(indexForItem);