Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

file_manager: Check tag before querying current path #1442

Merged
merged 1 commit into from
Jul 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions tags/file_manager/file_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ def gui_files(gui: imgui.GUI):


def clear_lists():
global folder_selections, file_selections
global folder_selections, file_selections, current_folder_page, current_file_page
if (
len(ctx.lists["self.file_manager_directories"]) > 0
or len(ctx.lists["self.file_manager_files"]) > 0
Expand Down Expand Up @@ -398,12 +398,15 @@ def win_event_handler(window):
if not window.app.exe or window != ui.active_window():
return

path = actions.user.file_manager_current_path()

if "user.file_manager" not in registry.tags:
actions.user.file_manager_hide_pickers()
clear_lists()
elif path:
cached_path = None
return

path = actions.user.file_manager_current_path()

if path:
if cached_path != path:
update_lists(path)
elif cached_path:
Expand Down