diff options
| author | Andreas Krutzler <[email protected]> | 2017-10-27 07:01:54 -0600 |
|---|---|---|
| committer | Nathaniel Graham <[email protected]> | 2017-10-27 07:06:13 -0600 |
| commit | 5454283008f26d377a6403861a3cdd7992dbbd38 (patch) | |
| tree | 45bf855f3d85990de468204f2e224f7a12f6c0d7 /src/kitemviews/kitemlistcontroller.cpp | |
| parent | f20300256b19cb0a700bc6e5536ba9184503d918 (diff) | |
Two clicks on file/folder to rename
Summary:
Make renaming of files/folders faster by clicking a second time on the items text to start renaming.
BUG: 205157
Test Plan:
This feature works as follows:
1. select an item by single-click, or one is already selected
2. wait the "double-click-interval"
3. click on the items text
4. none of the cancellations (see below) happens within the double-click-interval
5. inline-renaming starts
Cancellations:
* open any file/folder
* select different item(s)
* start dragging items
* Dolphin loses focus
This feature is just enabled while "Double-click to open files and folders" in system-settings and "Rename inline" in Dolphin are enabled.
Reviewers: #dolphin, #kde_applications, elvisangelaccio, emmanuelp, ngraham, markg, rkflx
Reviewed By: #dolphin, #kde_applications, elvisangelaccio, ngraham, rkflx
Subscribers: rkflx, markg, funkybomber, sars, elvisangelaccio, ngraham
Differential Revision: https://phabricator.kde.org/D7647
Diffstat (limited to 'src/kitemviews/kitemlistcontroller.cpp')
| -rw-r--r-- | src/kitemviews/kitemlistcontroller.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/kitemviews/kitemlistcontroller.cpp b/src/kitemviews/kitemlistcontroller.cpp index 3731895d0..753d7915d 100644 --- a/src/kitemviews/kitemlistcontroller.cpp +++ b/src/kitemviews/kitemlistcontroller.cpp @@ -583,6 +583,10 @@ bool KItemListController::mousePressEvent(QGraphicsSceneMouseEvent* event, const // -> remember that the user pressed an item which had been selected already and // clear the selection in mouseReleaseEvent(), unless the items are dragged. m_clearSelectionIfItemsAreNotDragged = true; + + if (m_selectionManager->selectedItems().count() == 1 && m_view->isAboveText(m_pressedIndex, m_pressedMousePos)) { + emit selectedItemTextPressed(m_pressedIndex); + } } if (!shiftPressed) { |
