Skip to content

dolphinview: after renaming, immediately select the renamed file

Jin Liu requested to merge work/jinliu/select-after-rename into master

Previously, the selection would be lost for about 1 second until the view automatically refreshes. This MR makes it select the renamed file immediately after renaming:

  1. Fixed a bug in KFileItem::setData, which the inline renaming uses to update the file to be renamed in the model to the new name. But the bug prevents m_model->index to find the updated name later.
  2. Inline renaming now calls updateSelectionState after the user presses enter, so the renamed file is immediately selected.
  3. Rename dialog now on finish, updates the model (like in inline renaming) to reflect the new name, and calls updateSelectionState, so the renamed file is immediately selected.

BUG: 481717

Edited by Jin Liu

Merge request reports