some fixes
This commit is contained in:
@@ -354,8 +354,14 @@ class PreprocessDialog(QDialog):
|
||||
can_finalize: bool,
|
||||
can_capture_all: bool,
|
||||
variant_count: int = 1,
|
||||
actions_enabled: bool = True,
|
||||
) -> None:
|
||||
"""Update sequence progress/status widgets."""
|
||||
"""Update sequence progress/status widgets.
|
||||
|
||||
With ``actions_enabled=False`` the progress labels still update but every
|
||||
sequence action button is kept disabled — used while a blocking capture
|
||||
runs, so input queued during the freeze cannot trigger another action.
|
||||
"""
|
||||
if kind is None:
|
||||
self._active_kind_label.setText("<none>")
|
||||
self._progress_label.setText("0 / 0")
|
||||
@@ -368,13 +374,14 @@ class PreprocessDialog(QDialog):
|
||||
self._capture_all_button.setText("Capture All Remaining")
|
||||
return
|
||||
|
||||
actions_enabled = bool(actions_enabled)
|
||||
active_label = preprocess_asset_display_name(kind) if kind in PREPROCESS_ASSET_SPECS else kind
|
||||
self._active_kind_label.setText(active_label)
|
||||
self._progress_label.setText(f"{captured_count} / {total_count}")
|
||||
self._undo_last_button.setEnabled(bool(can_undo))
|
||||
self._save_sequence_button.setEnabled(bool(can_finalize))
|
||||
self._capture_all_button.setEnabled(bool(can_capture_all))
|
||||
self._abort_button.setEnabled(True)
|
||||
self._undo_last_button.setEnabled(bool(can_undo) and actions_enabled)
|
||||
self._save_sequence_button.setEnabled(bool(can_finalize) and actions_enabled)
|
||||
self._capture_all_button.setEnabled(bool(can_capture_all) and actions_enabled)
|
||||
self._abort_button.setEnabled(actions_enabled)
|
||||
self._capture_all_button.setText("Capture All Remaining")
|
||||
if next_input is None or next_output is None:
|
||||
self._combo_label.setText("<complete>")
|
||||
@@ -384,7 +391,7 @@ class PreprocessDialog(QDialog):
|
||||
if int(variant_count) > 1:
|
||||
combo_text += f" | radar configs={int(variant_count)}"
|
||||
self._combo_label.setText(combo_text)
|
||||
self._capture_next_button.setEnabled(True)
|
||||
self._capture_next_button.setEnabled(actions_enabled)
|
||||
|
||||
def set_available_sets(self, available_sets: dict[str, list[str]]) -> None:
|
||||
"""Replace combo-box choices for all preprocess assets."""
|
||||
|
||||
Reference in New Issue
Block a user