godot icon indicating copy to clipboard operation
godot copied to clipboard

Fix FileSystem dock navigation when using Split Mode

Open larspet opened this issue 1 year ago • 5 comments

Fixes #100277

The regression was introduced by #100010 (most likely), which made bigger changes to _navigate_to_path(). This also simplifies the logic a bit, and does less trimming and appending of / all the time.

larspet avatar Dec 12 '24 19:12 larspet

Show in FileSystem does not work properly in split mode. You need to use it twice to show the file.

KoBeWi avatar Dec 14 '24 23:12 KoBeWi

Show in FileSystem does not work properly in split mode. You need to use it twice to show the file.

Fixed.

Also, I've noticed that every time navigate_to_path() is called, _navigate_to_path() will be called twice, because of the "Filter Files" search box being cleared with file_list_search_box->clear() and thus invoking _search_changed().

This would be simple enough to fix in the case when it's already empty and doesn't need to be cleared, but in the other case it's a little more involved. Since this is also kind of a separate issue, it's probably better handled in a separate PR.

larspet avatar Dec 15 '24 03:12 larspet

_navigate_to_path() will be called twice, because of the "Filter Files" search box being cleared with file_list_search_box->clear() and thus invoking _search_changed().

Sounds like #100275 will fix it.

KoBeWi avatar Dec 15 '24 16:12 KoBeWi

Another bug is that it changes behavior when navigating to folder depending on / suffix. With the suffix it correctly selects the folder in tree (in split view), without the suffix it selects the parent folder instead. The previous implementation was a bit hacky, but it was to ensure that folders work correctly both with and without the / suffix.

KoBeWi avatar Dec 15 '24 17:12 KoBeWi

It should work now regardless of the path ending with / or not. I also made it default to res:// if the given path is empty.

larspet avatar Dec 15 '24 20:12 larspet

Thanks!

KoBeWi comments were all non-blockers, so they can be handled in a separate PR

Repiteo avatar Dec 16 '24 18:12 Repiteo