From: bri Date: Mon, 11 Feb 2013 05:32:49 +0000 (+0000) Subject: MPV: make load script dialog initializes in the Siman scripts storage path if it... X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2FBR_siman_phase1;p=modules%2Fgui.git MPV: make load script dialog initializes in the Siman scripts storage path if it is Siman session --- diff --git a/src/SalomeApp/SalomeApp_Application.cxx b/src/SalomeApp/SalomeApp_Application.cxx index 3c71409b5..8cea8f3c8 100644 --- a/src/SalomeApp/SalomeApp_Application.cxx +++ b/src/SalomeApp/SalomeApp_Application.cxx @@ -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 );