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=5dcf1276613faf397505e5c68d23ae283796e2e5;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 );