┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/kitemlistview.h
diff options
context:
space:
mode:
authorIlia Kats <[email protected]>2024-12-09 11:31:44 +0000
committerFelix Ernst <[email protected]>2024-12-09 11:31:44 +0000
commita6b4348ddbc8fdf64ddb2c454e7fa2179e82c61b (patch)
tree3a5145b54b697a564d430ad45c8621e1f90bbb41 /src/kitemviews/kitemlistview.h
parent8aa952fa950e9c91a28371abfd8f86df5bf350c3 (diff)
Fix inline renaming multiple files when renaming changes sorting order
Suppose we are renaming file i and the new name will be sorted after file i+1. We are now pressing ArrowDown to immediately start renaming file i+1. However, because of the sorting we would not actually end up renaming what used to be file i+1. What would happen is that editing would be started in dolphinview.cpp:2065. However, after 100 ms the timer in KFileItemModel would fire, resulting in the model emitting itemsMoved(). This would trigger doLayout() in KItemListView::slotItemsMoved(). doLayout() resizes the KItemListWidgets, wich causes the renaming to be canceled in KStandardItemListWidget::resizeEvent(). Now, we start a new renaming operation for the correct widget after the relayouting is complete.
Diffstat (limited to 'src/kitemviews/kitemlistview.h')
-rw-r--r--src/kitemviews/kitemlistview.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/kitemviews/kitemlistview.h b/src/kitemviews/kitemlistview.h
index 7be08302c..30ce4d871 100644
--- a/src/kitemviews/kitemlistview.h
+++ b/src/kitemviews/kitemlistview.h
@@ -794,6 +794,8 @@ private:
friend class KItemListControllerTest;
friend class KItemListViewAccessible;
friend class KItemListDelegateAccessible;
+
+ friend class DolphinMainWindowTest;
};
/**