From: vsr Date: Tue, 17 Oct 2017 09:04:49 +0000 (+0300) Subject: Fix pb with persistence mechanism for "light" modules: when saving from CORBA API... X-Git-Tag: V8_5_0a2^2~1^2^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=fb73dc7841ef632bda68f72a986b3a41e7a82c4a;p=modules%2Fgui.git Fix pb with persistence mechanism for "light" modules: when saving from CORBA API (SALOMEDS), data of light modules is lost - Part 3 --- diff --git a/src/SalomeApp/SalomeApp_Engine_i.cxx b/src/SalomeApp/SalomeApp_Engine_i.cxx index 689d55192..4c85ff6c7 100644 --- a/src/SalomeApp/SalomeApp_Engine_i.cxx +++ b/src/SalomeApp/SalomeApp_Engine_i.cxx @@ -111,6 +111,7 @@ SALOMEDS::TMPFile* SalomeApp_Engine_i::Save (SALOMEDS::SComponent_ptr theCompone SalomeApp_Study* study = getStudyById( studyId ); if ( !study ) return aStreamFile._retn(); + QString url = QString::fromStdString(study->studyDS()->URL()); // - Get app SalomeApp_Application* app = dynamic_cast( study->application() ); if ( !app ) @@ -125,7 +126,9 @@ SALOMEDS::TMPFile* SalomeApp_Engine_i::Save (SALOMEDS::SComponent_ptr theCompone return aStreamFile._retn(); // - Save data files QStringList dataFiles; - dataModel->saveAs( theURL, study, dataFiles ); + // we use 'url' instead of 'theURL' as latter normally contains path to the tmp dir, + // but not actual study's URL + dataModel->saveAs( url, study, dataFiles ); std::vector names; foreach ( QString name, dataFiles ) { if ( !name.isEmpty() )