After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 789111 - [PATCH] Renaming a file can make it to loose selection, instead next or previous row is selected
[PATCH] Renaming a file can make it to loose selection, instead next or previ...
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Widget: GtkFileChooser
3.22.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2017-10-17 17:07 UTC by Nelson Benitez
Modified: 2018-05-02 19:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
filechooser: keep file selected after being renamed (4.35 KB, patch)
2017-10-17 17:16 UTC, Nelson Benitez
none Details | Review
Screencast showing the bug (1.49 MB, image/gif)
2017-10-17 17:36 UTC, Nelson Benitez
  Details
Screencast showing the bug fixed after patch (1.01 MB, image/gif)
2017-10-17 17:36 UTC, Nelson Benitez
  Details

Description Nelson Benitez 2017-10-17 17:07:01 UTC
When you rename a file in a "sort by name" filechooser, if you alter the start of the name the file will be resort-ed to another position, and selection will not follow it, instead selection will stay in the same row, which now is occupied by another file (the next or previous file of the one we renamed).

Filechooser should make sure the renamed file keeps being selected.

I will attach a patch to fix this issue.
Comment 1 Nelson Benitez 2017-10-17 17:16:59 UTC
Created attachment 361764 [details] [review]
filechooser: keep file selected after being renamed

Because otherwise in a "sort by name" chooser, the new name
causes the file to be re-sorted to another row, but the
selection stays in the old row which is now occupied by
another file.

Fixed by keeping track of the renamed file and revealing in
our handler for "row-changed" signal, which gets emitted
after a file is renamed.
Comment 2 Nelson Benitez 2017-10-17 17:36:00 UTC
Created attachment 361765 [details]
Screencast showing the bug
Comment 3 Nelson Benitez 2017-10-17 17:36:51 UTC
Created attachment 361766 [details]
Screencast showing the bug fixed after patch
Comment 4 GNOME Infrastructure Team 2018-05-02 19:17:57 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gtk/issues/948.