Skip to content

Commit

Permalink
Revert select prev after new folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremy Wootten committed Dec 3, 2023
1 parent f8fba5e commit cf25641
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/FolderManager/FolderItem.vala
Original file line number Diff line number Diff line change
Expand Up @@ -118,18 +118,15 @@ namespace Scratch.FolderManager {

var rename_menu_item = new Gtk.MenuItem.with_label (_("Rename"));
rename_menu_item.activate.connect (() => {
var prev_selected = (Item)(view.selected);
selectable = true;
if (view.start_editing_item (this)) {
warning ("start editing");
// Need to poll view as no signal emited when editing cancelled and need to set
// selectable to false anyway.
Timeout.add (200, () => {
if (view.editing) {
return Source.CONTINUE;
} else {
selectable = false;
view.select_path (prev_selected.file.path);
}

return Source.REMOVE;
Expand Down

0 comments on commit cf25641

Please sign in to comment.