From 24c32edb02e27dffeff4b74844e789ec23f98a9a Mon Sep 17 00:00:00 2001 From: Akseli Lahtinen Date: Fri, 9 Jan 2026 13:16:43 +0200 Subject: 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. --- src/views/dolphinview.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') 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) -- cgit v1.3