Skip to content

Commit

Permalink
- changed minimum limit of numberOfIntervals to zero.
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@19036 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adeas31 committed Feb 10, 2014
1 parent 0920e87 commit fa66354
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions OMEdit/OMEditGUI/GUI/Dialogs/SimulationDialog.cpp
Expand Up @@ -165,7 +165,7 @@ void SimulationDialog::setUpForm()
// Output Interval
mpNumberofIntervalLabel = new Label(tr("Number of Intervals:"));
mpNumberofIntervalsSpinBox = new QSpinBox;
mpNumberofIntervalsSpinBox->setRange(1, std::numeric_limits<int>::max());
mpNumberofIntervalsSpinBox->setRange(0, std::numeric_limits<int>::max());
mpNumberofIntervalsSpinBox->setSingleStep(100);
mpNumberofIntervalsSpinBox->setValue(500);
// Output Format
Expand Down Expand Up @@ -560,7 +560,7 @@ void SimulationDialog::saveSimulationOptions()
stopTime = mpStopTimeTextBox->text().toDouble();
startTime = mpStartTimeTextBox->text().toDouble();
numberOfIntervals = mpNumberofIntervalsSpinBox->value();
interval = (stopTime - startTime) / numberOfIntervals;
interval = (numberOfIntervals == 0) ? 0 : (stopTime - startTime) / numberOfIntervals;
annotationString.append("Interval=").append(QString::number(interval));
annotationString.append(")");
// send the simulations options annotation to OMC
Expand Down

0 comments on commit fa66354

Please sign in to comment.