From 453f0d98e01e81a11c065e293208ea4e9b424bf3 Mon Sep 17 00:00:00 2001 From: Joakim Hove Date: Tue, 23 Oct 2018 14:00:51 +0200 Subject: [PATCH] Fix interactve init case from scratch --- python/python/ert_gui/ertwidgets/models/ertmodel.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/python/python/ert_gui/ertwidgets/models/ertmodel.py b/python/python/ert_gui/ertwidgets/models/ertmodel.py index 9e9a93adad5..a085df5a18c 100644 --- a/python/python/ert_gui/ertwidgets/models/ertmodel.py +++ b/python/python/ert_gui/ertwidgets/models/ertmodel.py @@ -1,6 +1,7 @@ from res.analysis.analysis_module import AnalysisModule from res.analysis.enums.analysis_module_options_enum import AnalysisModuleOptionsEnum from res.enkf import RealizationStateEnum, EnkfVarType +from res.enkf import ErtRunContext from res.job_queue import WorkflowRunner from ecl.util.util import BoolVector, StringList from ert_gui import ERT @@ -88,10 +89,14 @@ def getCaseRealizationStates(case_name): @showWaitCursorWhileWaiting def initializeCurrentCaseFromScratch(parameters, members): selected_parameters = StringList(parameters) + mask = BoolVector(initial_size = getRealizationCount(), default_value = False) for member in members: member = int(member.strip()) - ERT.ert.getEnkfFsManager().initializeFromScratch(selected_parameters, member, member) + mask[member] = True + sim_fs = ERT.ert.getEnkfFsManager().getCurrentFileSystem() + run_context = ErtRunContext.case_init(sim_fs, mask) + ERT.ert.getEnkfFsManager().initializeFromScratch(selected_parameters, run_context) ERT.emitErtChange()