]> cloud.milkyroute.net Git - dolphin.git/commit
Fix scrolling to renamed file when using the rename dialog
authorElvis Angelaccio <elvis.angelaccio@kde.org>
Sun, 3 Jun 2018 16:28:23 +0000 (18:28 +0200)
committerElvis Angelaccio <elvis.angelaccio@kde.org>
Tue, 5 Jun 2018 20:07:45 +0000 (22:07 +0200)
commite308985de4b355e5758c916ba683040f6f394603
treeef188e1479bb1973e783764e6ef01589e0eb5ad0
parenta8bd6f4b1f65d402aacc2d66097fc0cbde870028
Fix scrolling to renamed file when using the rename dialog

Summary:
The `RenameDialog::slotResult()` slot is currently never called because
the dialog is deleted first, due to the usage of the `WA_DeleteOnClose`
attribute. This breaks the scroll-to-renamed-file feature when the
inline renaming is disabled.

Instead of deleting the dialog on close, we can use `deleteLater()` when
we are sure the dialog has actually finished its job, which is when the
KIO move job emits the `result` signal.

Test Plan:
- Disable inline renaming
- Rename a file so that it goes out of the view
- Check whether the view scrolls to the renamed file.

Reviewers: #dolphin, emateli

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D13304
src/panels/folders/folderspanel.cpp
src/views/dolphinview.cpp
src/views/renamedialog.cpp
src/views/renamedialog.h