Skip to content

Commit

Permalink
SimulationExperiment view: make sure that a model could be compiled b…
Browse files Browse the repository at this point in the history
…efore setting the current widget to our graph panel or graphs property editor (#1426).
  • Loading branch information
agarny committed Nov 2, 2017
1 parent 1bddb1e commit fe87817
Showing 1 changed file with 6 additions and 3 deletions.
Expand Up @@ -663,10 +663,13 @@ void SimulationExperimentViewInformationGraphPanelAndGraphsWidget::setMode(const
if (pMode != mMode) {
mMode = pMode;

// Set our graph panel or graphs property editor as our current
// widget
// Set our graph panel or graphs property editor as our current widget,
// if we have one (i.e. the model could be compiled)

setCurrentWidget((pMode == GraphPanel)?mGraphPanelPropertyEditor:mGraphsPropertyEditor);
Core::PropertyEditorWidget *propertyEditor = (pMode == GraphPanel)?mGraphPanelPropertyEditor:mGraphsPropertyEditor;

if (propertyEditor)
setCurrentWidget(propertyEditor);

// Let people know about our change of modes

Expand Down

0 comments on commit fe87817

Please sign in to comment.