Skip to content

Commit

Permalink
#143 Verify previous initialization success
Browse files Browse the repository at this point in the history
  • Loading branch information
M40V committed Feb 26, 2020
1 parent dfd712d commit 5da7e81
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,8 @@ def display_parameters(self, node_name, process, pipeline):
if self.main_window.pipeline_manager.pipelineEditorTabs\
.get_current_editor().node_parameters_tmp == \
self.main_window.pipeline_manager.pipelineEditorTabs\
.get_current_editor().node_parameters:
.get_current_editor().node_parameters and \
self.main_window.pipeline_manager.test_init:
self.main_window.pipeline_manager.run_pipeline_action \
.setDisabled(False)
else:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ def __init__(self, project, scan_list, main_window):
self.project = project
self.inheritance_dict = None
self.init_clicked = False
self.test_init = False
if len(scan_list) < 1:
self.scan_list = self.project.session.get_documents_names(
COLLECTION_CURRENT)
Expand Down Expand Up @@ -1259,14 +1260,14 @@ def initialize(self):
self.ignore = {}

try:
test_init = self.init_pipeline()
self.test_init = self.init_pipeline()
except Exception as e:
print("\nError during initialisation: ", e)
test_init = False
self.test_init = False
# If the initialization fail, the run pipeline action is disabled
# The run pipeline action is enabled only when an initialization is
# successful or the iterate pipeline checkbox is checked
if test_init:
if self.test_init:
self.run_pipeline_action.setDisabled(False)
else:
self.run_pipeline_action.setDisabled(True)
Expand Down

0 comments on commit 5da7e81

Please sign in to comment.