This commit is contained in:
Ayzen
2026-05-06 16:08:24 +03:00
parent cb4ba861d9
commit cf3f3cbd67
24 changed files with 670 additions and 247 deletions
@@ -11,6 +11,11 @@ from python_app.orchestration.live_processing_config import ProcessingLiveConfig
class AppWindowLiveProcessingMixin:
"""Handle live processing updates, redraws, and locator republishing."""
@staticmethod
def _is_gpr_processing_mode(mode: str) -> bool:
"""Return whether a mode uses GPR result payloads and plot surface."""
return mode in {"gpr", "legacy_gpr"}
def _validate_processing_mode_selection(self, mode: str) -> None:
"""Validate requested processing mode against current stable/live GUI state."""
validate_processing_mode_constraints(
@@ -23,10 +28,30 @@ class AppWindowLiveProcessingMixin:
"""Build live processing config from current processing widgets."""
self._sync_bscan_frequency_limits_with_radar()
self._sync_gpr_frequency_limits_with_radar()
mode = self._processing_mode.currentText()
if mode == "legacy_gpr":
gpr_input_positions_text = self._legacy_gpr_input_positions_input.text()
gpr_output_positions_text = self._legacy_gpr_output_positions_input.text()
gpr_min_depth_m = float(self._legacy_gpr_min_depth_m.value())
gpr_max_depth_m = float(self._legacy_gpr_max_depth_m.value())
gpr_start_freq_mhz = float(self._legacy_gpr_start_freq_mhz.value())
gpr_stop_freq_mhz = float(self._legacy_gpr_stop_freq_mhz.value())
gpr_background_enabled = bool(self._legacy_gpr_background_subtract_enabled.isChecked())
gpr_background_mean_count = int(self._legacy_gpr_background_mean_count.value())
else:
gpr_input_positions_text = self._gpr_input_positions_input.text()
gpr_output_positions_text = self._gpr_output_positions_input.text()
gpr_min_depth_m = float(self._gpr_min_depth_m.value())
gpr_max_depth_m = float(self._gpr_max_depth_m.value())
gpr_start_freq_mhz = float(self._gpr_start_freq_mhz.value())
gpr_stop_freq_mhz = float(self._gpr_stop_freq_mhz.value())
gpr_background_enabled = bool(self._gpr_background_subtract_enabled.isChecked())
gpr_background_mean_count = int(self._gpr_background_mean_count.value())
y_min_db = float(self._pass_through_y_min_db.value())
y_max_db = float(self._pass_through_y_max_db.value())
return ProcessingLiveConfig(
processor_mode=self._processing_mode.currentText(),
processor_mode=mode,
pass_through_channel="s21",
pass_through_fixed_y_enabled=bool(self._pass_through_fixed_y_enabled.isChecked()),
pass_through_y_min_db=min(y_min_db, y_max_db),
@@ -38,22 +63,22 @@ class AppWindowLiveProcessingMixin:
bscan_gain=float(self._bscan_gain.value()),
bscan_start_freq_mhz=float(self._bscan_start_freq_mhz.value()),
bscan_stop_freq_mhz=float(self._bscan_stop_freq_mhz.value()),
gpr_algorithm=self._gpr_algorithm.currentText(),
gpr_input_positions=self._parse_csv_int_list(self._gpr_input_positions_input.text()),
gpr_output_positions=self._parse_csv_int_list(self._gpr_output_positions_input.text()),
gpr_min_depth_m=float(self._gpr_min_depth_m.value()),
gpr_max_depth_m=float(self._gpr_max_depth_m.value()),
legacy_gpr_mode=self._legacy_gpr_config_mode.currentText(),
gpr_input_positions=self._parse_csv_int_list(gpr_input_positions_text),
gpr_output_positions=self._parse_csv_int_list(gpr_output_positions_text),
gpr_min_depth_m=gpr_min_depth_m,
gpr_max_depth_m=gpr_max_depth_m,
gpr_range_comp_power=float(self._gpr_range_comp_power.value()),
gpr_angle_comp_power=float(self._gpr_angle_comp_power.value()),
gpr_comp_power=float(self._gpr_comp_power.value()),
gpr_speed_m_s=float(self._gpr_speed_m_s.value()),
gpr_look_angle_deg=float(self._gpr_look_angle_deg.value()),
gpr_snr_thresh=float(self._gpr_snr_thresh.value()),
gpr_snr_comp_max=float(self._gpr_snr_comp_max.value()),
gpr_start_freq_mhz=float(self._gpr_start_freq_mhz.value()),
gpr_stop_freq_mhz=float(self._gpr_stop_freq_mhz.value()),
gpr_background_subtract_enabled=bool(self._gpr_background_subtract_enabled.isChecked()),
gpr_background_mean_count=int(self._gpr_background_mean_count.value()),
gpr_comp_power=float(self._legacy_gpr_comp_power.value()),
gpr_speed_m_s=float(self._legacy_gpr_speed_m_s.value()),
gpr_look_angle_deg=float(self._legacy_gpr_look_angle_deg.value()),
gpr_snr_thresh=float(self._legacy_gpr_snr_thresh.value()),
gpr_snr_comp_max=float(self._legacy_gpr_snr_comp_max.value()),
gpr_start_freq_mhz=gpr_start_freq_mhz,
gpr_stop_freq_mhz=gpr_stop_freq_mhz,
gpr_background_subtract_enabled=gpr_background_enabled,
gpr_background_mean_count=gpr_background_mean_count,
gpr_remove_sidelobe_objects_enabled=bool(self._gpr_remove_sidelobe_objects_enabled.isChecked()),
history_command_seq=int(self._history_command_seq),
history_command=str(history_command),
@@ -69,7 +94,7 @@ class AppWindowLiveProcessingMixin:
"""Handle live-processing setting changes and trigger redraw when needed."""
try:
current_mode = self._processing_mode.currentText()
if current_mode == "gpr":
if self._is_gpr_processing_mode(current_mode):
self._drain_results_until_quiet(timeout_s=0.05, poll_s=0.005)
self._write_live_processing_config()
@@ -77,7 +102,7 @@ class AppWindowLiveProcessingMixin:
self._drain_results_until_quiet(timeout_s=0.25, poll_s=0.01)
self._sync_bscan_history_from_results()
self._draw_bscan_heatmap_from_history()
elif current_mode == "gpr":
elif self._is_gpr_processing_mode(current_mode):
latest = self._drain_results_until_quiet(timeout_s=0.8, poll_s=0.02)
collection = latest
if collection is None and self._result_history:
@@ -96,7 +121,7 @@ class AppWindowLiveProcessingMixin:
def _on_gpr_visual_settings_changed(self, *_args) -> None:
"""Redraw current GPR result using updated GUI-only render settings."""
if self._processing_mode.currentText() != "gpr":
if not self._is_gpr_processing_mode(self._processing_mode.currentText()):
return
try:
if self._result_history and self._draw_results(self._result_history[-1]):
@@ -108,7 +133,7 @@ class AppWindowLiveProcessingMixin:
def _on_gpr_locator_threshold_changed(self, *_args) -> None:
"""Redraw GPR view and republish locator snapshot after threshold changes."""
self._on_gpr_visual_settings_changed()
if self._processing_mode.currentText() != "gpr":
if not self._is_gpr_processing_mode(self._processing_mode.currentText()):
return
try:
self._publish_locator_snapshot_from_latest_result()
@@ -118,7 +143,7 @@ class AppWindowLiveProcessingMixin:
def _on_gpr_locator_window_changed(self, *_args) -> None:
"""Redraw GPR view and republish locator snapshot after visible X/Z changes."""
self._on_gpr_visual_settings_changed()
if self._processing_mode.currentText() != "gpr":
if not self._is_gpr_processing_mode(self._processing_mode.currentText()):
return
try:
self._publish_locator_snapshot_from_latest_result()
@@ -131,8 +156,10 @@ class AppWindowLiveProcessingMixin:
"pass_through": 0,
"bscan": 1,
"gpr": 2,
"legacy_gpr": 3,
}
self._processing_mode_pages.setCurrentIndex(mode_to_page.get(mode, 0))
self._gpr_common_page.setVisible(self._is_gpr_processing_mode(mode))
current_page = self._processing_mode_pages.currentWidget()
if current_page is not None:
self._processing_mode_pages.setFixedHeight(current_page.sizeHint().height())
@@ -157,9 +184,9 @@ class AppWindowLiveProcessingMixin:
self._set_plot_mode(mode)
self._set_processing_mode_page(mode)
self._on_processing_live_settings_changed()
if mode == "gpr":
if self._is_gpr_processing_mode(mode):
self._publish_locator_snapshot_from_latest_result()
elif previous_mode == "gpr" and self._locator_service is not None:
elif self._is_gpr_processing_mode(previous_mode) and self._locator_service is not None:
self._locator_service.publish_empty()
if mode == "pass_through":
self._log(
@@ -182,21 +209,36 @@ class AppWindowLiveProcessingMixin:
elif mode == "gpr":
self._log(
"Processing mode selected: gpr "
f"(algorithm={self._gpr_algorithm.currentText()}, "
f"inputs={self._gpr_input_positions_input.text().strip() or '<all>'}, "
f"(inputs={self._gpr_input_positions_input.text().strip() or '<all>'}, "
f"outputs={self._gpr_output_positions_input.text().strip() or '<all>'}, "
f"depth={self._gpr_min_depth_m.value():g}..{self._gpr_max_depth_m.value():g} m, "
f"freq={self._gpr_start_freq_mhz.value():g}..{self._gpr_stop_freq_mhz.value():g} MHz, "
f"range_comp={self._gpr_range_comp_power.value():g}, "
f"angle_comp={self._gpr_angle_comp_power.value():g}, "
f"comp={self._gpr_comp_power.value():g}, "
f"snr={self._gpr_snr_thresh.value():g}, "
f"background_subtract={self._gpr_background_subtract_enabled.isChecked()}, "
f"mean_count={self._gpr_background_mean_count.value()}, "
f"remove_sidelobes={self._gpr_remove_sidelobe_objects_enabled.isChecked()}, "
f"render_mode={self._gpr_render_mode.currentText()}, "
f"min_score={self._gpr_min_visible_score.value():g})"
)
elif mode == "legacy_gpr":
self._log(
"Processing mode selected: legacy_gpr "
f"(mode={self._legacy_gpr_config_mode.currentText()}, "
f"inputs={self._legacy_gpr_input_positions_input.text().strip() or '<all>'}, "
f"outputs={self._legacy_gpr_output_positions_input.text().strip() or '<all>'}, "
f"depth={self._legacy_gpr_min_depth_m.value():g}..{self._legacy_gpr_max_depth_m.value():g} m, "
f"freq={self._legacy_gpr_start_freq_mhz.value():g}..{self._legacy_gpr_stop_freq_mhz.value():g} MHz, "
f"comp={self._legacy_gpr_comp_power.value():g}, "
f"snr={self._legacy_gpr_snr_thresh.value():g}, "
f"snr_comp_max={self._legacy_gpr_snr_comp_max.value():g}, "
f"speed={self._legacy_gpr_speed_m_s.value():g} m/s, "
f"look_angle={self._legacy_gpr_look_angle_deg.value():g} deg, "
f"background_subtract={self._legacy_gpr_background_subtract_enabled.isChecked()}, "
f"mean_count={self._legacy_gpr_background_mean_count.value()}, "
f"render_mode={self._legacy_gpr_render_mode.currentText()}, "
f"min_pairs={self._legacy_gpr_min_visible_pair_count.value()})"
)
def _clear_history_mode_caches(self) -> None:
"""Drop cached render state for pass-through, B-scan, and GPR views."""
@@ -218,7 +260,7 @@ class AppWindowLiveProcessingMixin:
self._bscan_plot.clear()
self._configure_bscan_plot_axes()
return
if self._processing_mode.currentText() == "gpr":
if self._is_gpr_processing_mode(self._processing_mode.currentText()):
if self._result_history and self._draw_results(self._result_history[-1]):
return
self._clear_gpr_plot()
@@ -70,25 +70,6 @@ class AppWindowConfigProfileIOMixin:
self._pass_through_y_min_db.setEnabled(enabled)
self._pass_through_y_max_db.setEnabled(enabled)
def _sync_gpr_algorithm_controls(self) -> None:
"""Enable only controls that affect the selected GPR algorithm."""
backprojection_enabled = self._gpr_algorithm.currentText() == "backprojection"
for widget in (
self._gpr_range_comp_power,
self._gpr_angle_comp_power,
self._gpr_remove_sidelobe_objects_enabled,
):
widget.setEnabled(backprojection_enabled)
for widget in (
self._gpr_comp_power,
self._gpr_speed_m_s,
self._gpr_look_angle_deg,
self._gpr_snr_thresh,
self._gpr_snr_comp_max,
):
widget.setEnabled(not backprojection_enabled)
def _apply_history_limit_from_config(self, config) -> None:
"""Resize in-memory history buffers to match the loaded config."""
history_limit = self._history_limit_for_config(config)
@@ -213,7 +194,6 @@ class AppWindowConfigProfileIOMixin:
self._bscan_start_freq_mhz,
self._bscan_stop_freq_mhz,
self._bscan_subtract_mean_ascan,
self._gpr_algorithm,
self._gpr_relative_permittivity,
self._gpr_tx_geometry_input,
self._gpr_rx_geometry_input,
@@ -223,11 +203,6 @@ class AppWindowConfigProfileIOMixin:
self._gpr_max_depth_m,
self._gpr_range_comp_power,
self._gpr_angle_comp_power,
self._gpr_comp_power,
self._gpr_speed_m_s,
self._gpr_look_angle_deg,
self._gpr_snr_thresh,
self._gpr_snr_comp_max,
self._gpr_start_freq_mhz,
self._gpr_stop_freq_mhz,
self._gpr_background_subtract_enabled,
@@ -239,6 +214,26 @@ class AppWindowConfigProfileIOMixin:
self._gpr_visible_x_max_m,
self._gpr_visible_z_min_m,
self._gpr_visible_z_max_m,
self._legacy_gpr_config_mode,
self._legacy_gpr_input_positions_input,
self._legacy_gpr_output_positions_input,
self._legacy_gpr_min_depth_m,
self._legacy_gpr_max_depth_m,
self._legacy_gpr_comp_power,
self._legacy_gpr_snr_thresh,
self._legacy_gpr_snr_comp_max,
self._legacy_gpr_start_freq_mhz,
self._legacy_gpr_stop_freq_mhz,
self._legacy_gpr_speed_m_s,
self._legacy_gpr_look_angle_deg,
self._legacy_gpr_background_subtract_enabled,
self._legacy_gpr_background_mean_count,
self._legacy_gpr_render_mode,
self._legacy_gpr_min_visible_pair_count,
self._legacy_gpr_visible_x_min_m,
self._legacy_gpr_visible_x_max_m,
self._legacy_gpr_visible_z_min_m,
self._legacy_gpr_visible_z_max_m,
self._save_count,
self._save_path_input,
self._save_name_input,
@@ -290,16 +285,10 @@ class AppWindowConfigProfileIOMixin:
)
self._gpr_input_positions_input.setText(str(gui_state.processing.gpr.input_positions))
self._gpr_output_positions_input.setText(str(gui_state.processing.gpr.output_positions))
self._set_combo_current_text(self._gpr_algorithm, gui_state.processing.gpr.algorithm)
self._gpr_min_depth_m.setValue(float(gui_state.processing.gpr.min_depth_m))
self._gpr_max_depth_m.setValue(float(gui_state.processing.gpr.max_depth_m))
self._gpr_range_comp_power.setValue(float(gui_state.processing.gpr.range_comp_power))
self._gpr_angle_comp_power.setValue(float(gui_state.processing.gpr.angle_comp_power))
self._gpr_comp_power.setValue(float(gui_state.processing.gpr.comp_power))
self._gpr_speed_m_s.setValue(float(gui_state.processing.gpr.speed_m_s))
self._gpr_look_angle_deg.setValue(float(gui_state.processing.gpr.look_angle_deg))
self._gpr_snr_thresh.setValue(float(gui_state.processing.gpr.snr_thresh))
self._gpr_snr_comp_max.setValue(float(gui_state.processing.gpr.snr_comp_max))
self._gpr_start_freq_mhz.setValue(float(gui_state.processing.gpr.start_freq_mhz))
self._gpr_stop_freq_mhz.setValue(float(gui_state.processing.gpr.stop_freq_mhz))
self._gpr_background_subtract_enabled.setChecked(
@@ -316,6 +305,29 @@ class AppWindowConfigProfileIOMixin:
self._gpr_visible_z_min_m.setValue(float(gui_state.processing.gpr.visible_z_min_m))
self._gpr_visible_z_max_m.setValue(float(gui_state.processing.gpr.visible_z_max_m))
self._set_combo_current_text(self._legacy_gpr_config_mode, gui_state.processing.legacy_gpr.mode)
self._legacy_gpr_input_positions_input.setText(str(gui_state.processing.legacy_gpr.input_positions))
self._legacy_gpr_output_positions_input.setText(str(gui_state.processing.legacy_gpr.output_positions))
self._legacy_gpr_min_depth_m.setValue(float(gui_state.processing.legacy_gpr.min_depth_m))
self._legacy_gpr_max_depth_m.setValue(float(gui_state.processing.legacy_gpr.max_depth_m))
self._legacy_gpr_comp_power.setValue(float(gui_state.processing.legacy_gpr.comp_power))
self._legacy_gpr_snr_thresh.setValue(float(gui_state.processing.legacy_gpr.snr_thresh))
self._legacy_gpr_snr_comp_max.setValue(float(gui_state.processing.legacy_gpr.snr_comp_max))
self._legacy_gpr_start_freq_mhz.setValue(float(gui_state.processing.legacy_gpr.start_freq_mhz))
self._legacy_gpr_stop_freq_mhz.setValue(float(gui_state.processing.legacy_gpr.stop_freq_mhz))
self._legacy_gpr_speed_m_s.setValue(float(gui_state.processing.legacy_gpr.speed_m_s))
self._legacy_gpr_look_angle_deg.setValue(float(gui_state.processing.legacy_gpr.look_angle_deg))
self._legacy_gpr_background_subtract_enabled.setChecked(
bool(gui_state.processing.legacy_gpr.background_subtract_enabled)
)
self._legacy_gpr_background_mean_count.setValue(int(gui_state.processing.legacy_gpr.background_mean_count))
self._set_combo_current_text(self._legacy_gpr_render_mode, gui_state.processing.legacy_gpr.render_mode)
self._legacy_gpr_min_visible_pair_count.setValue(int(gui_state.processing.legacy_gpr.min_visible_pair_count))
self._legacy_gpr_visible_x_min_m.setValue(float(gui_state.processing.legacy_gpr.visible_x_min_m))
self._legacy_gpr_visible_x_max_m.setValue(float(gui_state.processing.legacy_gpr.visible_x_max_m))
self._legacy_gpr_visible_z_min_m.setValue(float(gui_state.processing.legacy_gpr.visible_z_min_m))
self._legacy_gpr_visible_z_max_m.setValue(float(gui_state.processing.legacy_gpr.visible_z_max_m))
self._save_count.setValue(int(gui_state.data_actions.save_count))
self._save_path_input.setText(str(gui_state.data_actions.save_path))
self._save_name_input.setText(str(gui_state.data_actions.save_name))
@@ -330,7 +342,7 @@ class AppWindowConfigProfileIOMixin:
self._gpr_geometry_signature = None
self._gpr_selected_geometry = None
self._sync_pass_through_y_controls()
self._sync_gpr_algorithm_controls()
self._set_processing_mode_page(gui_state.processing.selected_mode)
self._refresh_preprocess_summary_labels()
if self._preprocess_dialog is not None:
@@ -175,6 +175,8 @@ class AppWindowRadarLimitsMixin:
"_bscan_stop_freq_mhz": "B-scan Stop MHz",
"_gpr_start_freq_mhz": "GPR Start MHz",
"_gpr_stop_freq_mhz": "GPR Stop MHz",
"_legacy_gpr_start_freq_mhz": "Legacy GPR Start MHz",
"_legacy_gpr_stop_freq_mhz": "Legacy GPR Stop MHz",
}
widgets = [getattr(self, widget_name) for widget_name in widget_names]
previous_values = {widget_name: getattr(self, widget_name).value() for widget_name in widget_names}
@@ -223,5 +225,7 @@ class AppWindowRadarLimitsMixin:
(
"_gpr_start_freq_mhz",
"_gpr_stop_freq_mhz",
"_legacy_gpr_start_freq_mhz",
"_legacy_gpr_stop_freq_mhz",
)
)
@@ -6,6 +6,7 @@ from python_app.models.gui_profile_model import (
GuiBscanStateModel,
GuiDataActionsStateModel,
GuiGprStateModel,
GuiLegacyGprStateModel,
GuiPassThroughStateModel,
GuiPreprocessDialogStateModel,
GuiProcessingStateModel,
@@ -183,6 +184,27 @@ class AppWindowConfigStateBuildersMixin:
visible_z_min_m=0.0,
visible_z_max_m=14.0,
),
legacy_gpr=GuiLegacyGprStateModel(
input_positions=self._default_gpr_input_positions_from_config(config),
output_positions=self._default_gpr_output_positions_from_config(config),
min_depth_m=2.0,
max_depth_m=14.0,
comp_power=0.2,
start_freq_mhz=3000.0,
stop_freq_mhz=6000.0,
speed_m_s=0.0,
look_angle_deg=0.0,
snr_thresh=4.5,
snr_comp_max=25.0,
background_subtract_enabled=True,
background_mean_count=10,
render_mode="heatmap",
min_visible_pair_count=1,
visible_x_min_m=default_gpr_x_min_m,
visible_x_max_m=default_gpr_x_max_m,
visible_z_min_m=0.0,
visible_z_max_m=14.0,
),
),
data_actions=GuiDataActionsStateModel(
save_count=10,
@@ -252,18 +274,12 @@ class AppWindowConfigStateBuildersMixin:
subtract_mean_ascan=bool(self._bscan_subtract_mean_ascan.isChecked()),
),
gpr=GuiGprStateModel(
algorithm=self._gpr_algorithm.currentText(),
input_positions=self._gpr_input_positions_input.text().strip(),
output_positions=self._gpr_output_positions_input.text().strip(),
min_depth_m=float(self._gpr_min_depth_m.value()),
max_depth_m=float(self._gpr_max_depth_m.value()),
range_comp_power=float(self._gpr_range_comp_power.value()),
angle_comp_power=float(self._gpr_angle_comp_power.value()),
comp_power=float(self._gpr_comp_power.value()),
speed_m_s=float(self._gpr_speed_m_s.value()),
look_angle_deg=float(self._gpr_look_angle_deg.value()),
snr_thresh=float(self._gpr_snr_thresh.value()),
snr_comp_max=float(self._gpr_snr_comp_max.value()),
start_freq_mhz=float(self._gpr_start_freq_mhz.value()),
stop_freq_mhz=float(self._gpr_stop_freq_mhz.value()),
background_subtract_enabled=bool(self._gpr_background_subtract_enabled.isChecked()),
@@ -276,6 +292,28 @@ class AppWindowConfigStateBuildersMixin:
visible_z_min_m=float(self._gpr_visible_z_min_m.value()),
visible_z_max_m=float(self._gpr_visible_z_max_m.value()),
),
legacy_gpr=GuiLegacyGprStateModel(
mode=self._legacy_gpr_config_mode.currentText(),
input_positions=self._legacy_gpr_input_positions_input.text().strip(),
output_positions=self._legacy_gpr_output_positions_input.text().strip(),
min_depth_m=float(self._legacy_gpr_min_depth_m.value()),
max_depth_m=float(self._legacy_gpr_max_depth_m.value()),
comp_power=float(self._legacy_gpr_comp_power.value()),
start_freq_mhz=float(self._legacy_gpr_start_freq_mhz.value()),
stop_freq_mhz=float(self._legacy_gpr_stop_freq_mhz.value()),
speed_m_s=float(self._legacy_gpr_speed_m_s.value()),
look_angle_deg=float(self._legacy_gpr_look_angle_deg.value()),
snr_thresh=float(self._legacy_gpr_snr_thresh.value()),
snr_comp_max=float(self._legacy_gpr_snr_comp_max.value()),
background_subtract_enabled=bool(self._legacy_gpr_background_subtract_enabled.isChecked()),
background_mean_count=int(self._legacy_gpr_background_mean_count.value()),
render_mode=self._legacy_gpr_render_mode.currentText(),
min_visible_pair_count=int(self._legacy_gpr_min_visible_pair_count.value()),
visible_x_min_m=float(self._legacy_gpr_visible_x_min_m.value()),
visible_x_max_m=float(self._legacy_gpr_visible_x_max_m.value()),
visible_z_min_m=float(self._legacy_gpr_visible_z_min_m.value()),
visible_z_max_m=float(self._legacy_gpr_visible_z_max_m.value()),
),
),
data_actions=GuiDataActionsStateModel(
save_count=int(self._save_count.value()),
@@ -325,7 +363,7 @@ class AppWindowConfigStateBuildersMixin:
combo_text = self._combos_text.text()
config.combos = parse_combos_from_text(combo_text)
config.ensure_combos()
if self._processing_mode.currentText() != "gpr" and self._switches_are_effectively_static(config):
if self._processing_mode.currentText() not in {"gpr", "legacy_gpr"} and self._switches_are_effectively_static(config):
config.combos = [ComboModel(input=0, output=0)]
for key in PREPROCESS_ASSET_KEYS: