Skip to content

Commit

Permalink
Only set active realizations when restart is checked es_mda
Browse files Browse the repository at this point in the history
  • Loading branch information
larsevj committed Dec 6, 2024
1 parent b903bb0 commit e6aff6b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/ert/gui/simulation/multiple_data_assimilation_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ def __init__(
)
self._active_realizations_field.setValidator(RangeStringArgument(ensemble_size))
self._ensemble_selector = EnsembleSelector(notifier)
self._realizations_from_fs()
layout.addRow("Active realizations:", self._active_realizations_field)

self._restart_box = QCheckBox("")
Expand All @@ -114,6 +113,7 @@ def __init__(
self._restart_box.toggled.connect(self.update_experiment_edit)

self._restart_box.setEnabled(bool(self._ensemble_selector._ensemble_list()))
self._ensemble_selector.setEnabled(False)
layout.addRow("Restart run:", self._restart_box)

self._ensemble_selector.ensemble_populated.connect(self.restart_run_toggled)
Expand Down Expand Up @@ -189,6 +189,11 @@ def restart_run_toggled(self) -> None:
if self._restart_box.isChecked()
else MultipleDataAssimilation.default_weights
)
if self._restart_box.isChecked():
self._realizations_from_fs()
else:
# If box is unchecked we reset to the default mask
self._active_realizations_field.model.setValue(value="")

def _createInputForWeights(self, layout: QFormLayout) -> None:
relative_iteration_weights_model = ValueModel(self.weights)
Expand Down

0 comments on commit e6aff6b

Please sign in to comment.