Update gallery_app.py
This commit is contained in:
@@ -849,14 +849,17 @@ def build_header():
|
|||||||
|
|
||||||
state.profile_name = e.value
|
state.profile_name = e.value
|
||||||
state.load_active_profile()
|
state.load_active_profile()
|
||||||
state.active_cat = "control" # Reset to default category
|
|
||||||
SorterEngine.clear_staging_area() # Clear staging for new profile
|
|
||||||
|
|
||||||
# Auto-load if source path exists
|
# Reset to first available category for new profile
|
||||||
if os.path.exists(state.source_dir):
|
cats = state.get_categories()
|
||||||
load_images()
|
state.active_cat = cats[0] if cats else "control"
|
||||||
else:
|
|
||||||
|
# Clear staging and hotkeys for new profile
|
||||||
|
SorterEngine.clear_staging_area()
|
||||||
|
state.category_hotkeys = {} # Reset hotkeys when switching profile
|
||||||
state.all_images = []
|
state.all_images = []
|
||||||
|
state.staged_data = {}
|
||||||
|
|
||||||
refresh_staged_info()
|
refresh_staged_info()
|
||||||
refresh_ui()
|
refresh_ui()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user