Skip to content

Commit

Permalink
Initialize run dialog on contructor.
Browse files Browse the repository at this point in the history
  • Loading branch information
joaquinffernandez committed Oct 26, 2022
1 parent dc6adbe commit 4a40205
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/gui/mmomegui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ MmomeGui::MmomeGui() : QMainWindow(), _sbmlFile()
addMenuBarItems();
enableActions(true);
_settings_only = false;
_runDlg = new RunDlg(this);
connect(_runDlg, SIGNAL(accepted()), this, SLOT(runDlgClose()));
connect(_runDlg, SIGNAL(rejected()), this, SLOT(runDlgRejected()));
}

MmomeGui::~MmomeGui() { Editor::drop(); }
Expand Down Expand Up @@ -376,7 +379,6 @@ void MmomeGui::runDlgClose()
}
compile(debugFlag);
}
delete _runDlg;
}

void MmomeGui::on_actionRun_2_triggered()
Expand All @@ -395,9 +397,6 @@ void MmomeGui::on_actionRun_triggered()
return;
}
_compiler_msg->clear();
_runDlg = new RunDlg(this);
connect(_runDlg, SIGNAL(accepted()), this, SLOT(runDlgClose()));
connect(_runDlg, SIGNAL(rejected()), this, SLOT(runDlgRejected()));
_runDlg->setStartTime(Editor::instance()->startTime());
_runDlg->setStopTime(Editor::instance()->stopTime());
_runDlg->setTolerance(Editor::instance()->tolerance());
Expand Down

0 comments on commit 4a40205

Please sign in to comment.