Auto-open Kit Manager when file has kits without checksums

When a SAX file is opened and any declared kit is missing a checksum,
the Kit Manager panel opens automatically and the palette stays empty
until the checksums are resolved.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-09-08 22:57:47 +03:00
co-authored by Claude Opus 4.6
parent 5045cfbe35
commit 78678e1e0c
2 changed files with 16 additions and 3 deletions
+15 -2
View File
@@ -1578,11 +1578,21 @@ def on_tree_filled():
if app_state.current_file_path != _history_file_path:
_history_file_path = app_state.current_file_path
reset_view_history()
if _schema_has_incomplete_checksums():
show_kits()
else:
_prune_view_history()
update_history_controls()
def _schema_has_incomplete_checksums():
"""Whether any declared kit is missing a checksum."""
if not app_state.active_schema_kits:
return False
return any(cs is None for cs in app_state.active_schema_kits.values())
# --- Dialogs ---
def open_preferences_dialog():
@@ -2105,8 +2115,11 @@ def refresh_palette_kits():
global palette_kit_names
palette.invalidate()
declared = list(app_state.active_schema_kits.keys())
palette_kit_names = sorted(declared)
if _schema_has_incomplete_checksums():
palette_kit_names = []
else:
palette_kit_names = sorted(app_state.active_schema_kits.keys())
labels = []
for kit_name in palette_kit_names: