Skip to content

Commit

Permalink
Add default for relative tolerance
Browse files Browse the repository at this point in the history
  • Loading branch information
t-sommer committed Jan 10, 2022
1 parent f4a2f5f commit f3ce0dd
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Java/src/main/java/fmikit/ui/FMUBlockDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -1464,10 +1464,12 @@ public boolean isCellEditable(EventObject event) {
}

// advanced
String relativeTolerance = "0";

if (userData != null) {
txtRelativeTolerance.setText(userData.relativeTolerance);
} else if (modelDescription.defaultExperiment != null && modelDescription.defaultExperiment.tolerance != null) {
txtRelativeTolerance.setText(modelDescription.defaultExperiment.tolerance);
relativeTolerance = userData.relativeTolerance;
} else if (modelDescription.defaultExperiment != null && modelDescription.defaultExperiment.tolerance != null && !modelDescription.defaultExperiment.tolerance.trim().isEmpty()) {
relativeTolerance = modelDescription.defaultExperiment.tolerance;
}

// update the platforms
Expand Down

0 comments on commit f3ce0dd

Please sign in to comment.