┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkseli Lahtinen <[email protected]>2026-01-09 13:16:43 +0200
committerAkseli Lahtinen <[email protected]>2026-01-09 16:55:32 +0200
commit24c32edb02e27dffeff4b74844e789ec23f98a9a (patch)
treea9930afc61499de611d74bd26e4a88a6f4db9f87
parent5b612c6620ced914c7fd239737bef2a6cb55fc50 (diff)
DolphinView: Avoid using dynamic view if any items in the view are expanded
Previously in cases where user was expanding a folder that has only images in detailed view, it would suddenly change into dynamic view. This patch avoids doing any changes to the user workflow if they have expanded the folder, avoiding surprising behavior.
-rw-r--r--src/views/dolphinview.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp
index f2d1165f5..bc6759d4a 100644
--- a/src/views/dolphinview.cpp
+++ b/src/views/dolphinview.cpp
@@ -2435,6 +2435,14 @@ void DolphinView::applyDynamicView()
const KFileItemList itemList = items();
bool applyDynamicView = false;
+ // If any of the files are expanded, we do not want to interrupt
+ // the user workflow with dynamic changes
+ for (const auto &item : itemList) {
+ if (item.isDir() && isExpanded(item)) {
+ return;
+ }
+ }
+
for (const auto &file : itemList) {
++checkedItems;
#if QT_VERSION >= QT_VERSION_CHECK(6, 8, 0)