Skip to content

Commit

Permalink
Only disable weights when weights have been found in storage
Browse files Browse the repository at this point in the history
  • Loading branch information
andreas-el committed Sep 6, 2024
1 parent 56c5ffa commit eb8410d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/ert/gui/simulation/multiple_data_assimilation_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ def update_experiment_name(self) -> None:
self._ensemble_selector.selected_ensemble.relative_weights
or MultipleDataAssimilation.default_weights
)
self._evaluate_weights_box_enabled()

@Slot(bool)
def update_experiment_edit(self, checked: bool) -> None:
Expand All @@ -166,7 +167,13 @@ def update_experiment_edit(self, checked: bool) -> None:

self._experiment_name_field.enable_validation(not checked)
self._experiment_name_field.setEnabled(not checked)
self._relative_iteration_weights_box.setEnabled(not checked)
self._evaluate_weights_box_enabled()

def _evaluate_weights_box_enabled(self) -> None:
self._relative_iteration_weights_box.setEnabled(
not self._restart_box.isChecked()
or not self._ensemble_selector.selected_ensemble.relative_weights
)

def restart_run_toggled(self) -> None:
self._restart_box.setEnabled(bool(self._ensemble_selector._ensemble_list()))
Expand Down

0 comments on commit eb8410d

Please sign in to comment.