X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/2bdaa0aa3fab52f0808f60d9bbdabcd56d0efae9..refs/heads/master:/MainWindow.cpp?ds=inline diff --git a/MainWindow.cpp b/MainWindow.cpp index 8169dd0..6f4716a 100644 --- a/MainWindow.cpp +++ b/MainWindow.cpp @@ -311,9 +311,14 @@ void MainWindow::save(QString projectFile) { params->save(projectFile); } -void MainWindow::slotLoadProject(){ +void MainWindow::slotLoadProject(QString fileName){ - params->projectFile = QFileDialog::getOpenFileName(0, "select a project file", "save/",tr("sauvegardes (*.xml)")); + if (fileName == "") { + params->projectFile = QFileDialog::getOpenFileName(0, "select a project file", "save/",tr("sauvegardes (*.xml)")); + } + else { + params->projectFile = fileName; + } if(! params->projectFile.isEmpty()){ GroupWidget* topGroup = dispatcher->loadProject(params->projectFile); @@ -345,7 +350,7 @@ void MainWindow::slotNewProject(){ if (ret == 1) { enableProjectActions(true, PROJECT_CLOSE | PROJECT_SAVE | PROJECT_SAVEAS | PROJECT_LIB, OP_RAZ); enableAnalysisActions(true, ANALYSIS_ANALYZE | ANALYSIS_GENERATE, OP_RAZ); - GroupWidget* topGroup = dispatcher->createTopScene(Dispatcher::Design); + GroupWidget* topGroup = dispatcher->createTopScene(Dispatcher::Design, params->mainClock); addTopGroup(topGroup); library->updateComboScene(); library->updateBoxConn();