From fb73dc7841ef632bda68f72a986b3a41e7a82c4a Mon Sep 17 00:00:00 2001 From: vsr Date: Tue, 17 Oct 2017 12:04:49 +0300 Subject: [PATCH] Fix pb with persistence mechanism for "light" modules: when saving from CORBA API (SALOMEDS), data of light modules is lost - Part 3 --- src/SalomeApp/SalomeApp_Engine_i.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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() ) -- 2.39.2