]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
MPV: make load script dialog initializes in the Siman scripts storage path if it... BR_siman_phase1
authorbri <bri@opencascade.com>
Mon, 11 Feb 2013 05:32:49 +0000 (05:32 +0000)
committerbri <bri@opencascade.com>
Mon, 11 Feb 2013 05:32:49 +0000 (05:32 +0000)
src/SalomeApp/SalomeApp_Application.cxx

index 3c71409b59ca40e3aa3678be189ed8c0c39d9089..8cea8f3c86641a7d441a5cb059c8f1db95937cd3 100644 (file)
@@ -899,6 +899,15 @@ void SalomeApp_Application::onLoadScript( )
   QString anInitialPath = "";
   if ( SUIT_FileDlg::getLastVisitedPath().isEmpty() )
     anInitialPath = QDir::currentPath();
+  
+  // MPV: if it is SIMAN study, make the initial path as the path to the Siman scripts storage
+  if (myIsSiman) {
+    SALOMEDSClient_StudyManager* aMgr = studyMgr();
+    aMgr->GetSimanStudy()->StudyId();
+    anInitialPath = QString(QDir::separator()) + "tmp" + QDir::separator() + "SimanSalome" + QDir::separator() + 
+      aMgr->GetSimanStudy()->StudyId().c_str() + QDir::separator() +
+      aMgr->GetSimanStudy()->ScenarioId().c_str() + QDir::separator() + aMgr->GetSimanStudy()->UserId().c_str();
+  }
 
   QString aFile = SUIT_FileDlg::getFileName( desktop(), anInitialPath, filtersList, tr( "TOT_DESK_FILE_LOAD_SCRIPT" ), true, true );