Skip to content

Commit

Permalink
Check against the actual stop time
Browse files Browse the repository at this point in the history
Rename for OMSimulator models is not implemented yet.
  • Loading branch information
adeas31 committed Jan 23, 2019
1 parent 0ce89e2 commit d21bc7d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions OMEdit/OMEditGUI/Modeling/LibraryTreeWidget.cpp
Expand Up @@ -3149,6 +3149,7 @@ void LibraryTreeView::createActions()
// OMSimulator rename Action
mpOMSRenameAction = new QAction(Helper::rename, this);
mpOMSRenameAction->setStatusTip(Helper::OMSRenameTip);
mpOMSRenameAction->setEnabled(false);
connect(mpOMSRenameAction, SIGNAL(triggered()), SLOT(OMSRename()));
// OMSimulator simulation setup action
mpOMSSimulationSetupAction = new QAction(QIcon(":/Resources/icons/tlm-simulate.svg"), Helper::simulate, this);
Expand Down
2 changes: 1 addition & 1 deletion OMEdit/OMEditGUI/OMS/OMSSimulationOutputWidget.cpp
Expand Up @@ -161,7 +161,7 @@ void OMSSimulationOutputWidget::simulationProgress(QString ident, double time, o
if (status < oms_status_warning) {
int progress = (time * 100) / mOMSSimulationOptions.getStopTime();
mpProgressBar->setValue(progress);
if (qFloor(time) >= mOMSSimulationOptions.getStopTime()) {
if (time >= mOMSSimulationOptions.getStopTime()) {
mpProgressLabel->setText(tr("Simulation using the <b>%1</b> model is finished.").arg(mOMSSimulationOptions.getModelName()));
mpProgressBar->setValue(mpProgressBar->maximum());
mIsSimulationRunning = false;
Expand Down

0 comments on commit d21bc7d

Please sign in to comment.