From 11fb75fa2c4ef12a8e40744dfdb3898b29ab20aa Mon Sep 17 00:00:00 2001 From: asl Date: Thu, 29 Dec 2005 12:55:01 +0000 Subject: [PATCH] PAL10035 - no warning if there is no rights to save --- src/SalomeApp/SalomeApp_Study.cxx | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/SalomeApp/SalomeApp_Study.cxx b/src/SalomeApp/SalomeApp_Study.cxx index 3073e544e..8f22b42af 100644 --- a/src/SalomeApp/SalomeApp_Study.cxx +++ b/src/SalomeApp/SalomeApp_Study.cxx @@ -195,12 +195,13 @@ bool SalomeApp_Study::saveDocumentAs( const QString& theFileName ) return false; bool isMultiFile = resMgr->booleanValue( "Study", "multi_file", false ), - isAscii = resMgr->booleanValue( "Study", "ascii_file", false ); - isAscii ? SalomeApp_Application::studyMgr()->SaveAsASCII( theFileName.latin1(), studyDS(), isMultiFile ) : - SalomeApp_Application::studyMgr()->SaveAs ( theFileName.latin1(), studyDS(), isMultiFile ); + isAscii = resMgr->booleanValue( "Study", "ascii_file", false ), + res = isAscii ? + SalomeApp_Application::studyMgr()->SaveAsASCII( theFileName.latin1(), studyDS(), isMultiFile ) : + SalomeApp_Application::studyMgr()->SaveAs ( theFileName.latin1(), studyDS(), isMultiFile ) && + CAM_Study::saveDocumentAs( theFileName ) && //SRN: BugID IPAL9377, removed usage of uninitialized variable + saveStudyData(theFileName); - bool res = CAM_Study::saveDocumentAs( theFileName ); //SRN: BugID IPAL9377, removed usage of uninitialized variable - res = res && saveStudyData(theFileName); if ( res ) emit saved( this ); @@ -230,11 +231,10 @@ bool SalomeApp_Study::saveDocument() return false; bool isMultiFile = resMgr->booleanValue( "Study", "multi_file", false ), - isAscii = resMgr->booleanValue( "Study", "ascii_file", false ); - isAscii ? SalomeApp_Application::studyMgr()->SaveASCII( studyDS(), isMultiFile ) : - SalomeApp_Application::studyMgr()->Save ( studyDS(), isMultiFile ); - - bool res = CAM_Study::saveDocument(); + isAscii = resMgr->booleanValue( "Study", "ascii_file", false ), + res = isAscii ? + SalomeApp_Application::studyMgr()->SaveASCII( studyDS(), isMultiFile ) : + SalomeApp_Application::studyMgr()->Save ( studyDS(), isMultiFile ) && CAM_Study::saveDocument(); res = res && saveStudyData(studyName()); if ( res ) @@ -396,7 +396,7 @@ void SalomeApp_Study::addComponent(const CAM_DataModel* dm) } // Set default engine IOR aBuilder->DefineComponentInstance(aComp, SalomeApp_Application::defaultEngineIOR().latin1()); - SalomeApp_DataModel::BuildTree( aComp, root(), this, /*skipExisitng=*/true ); + SalomeApp_DataModel::synchronize( aComp, this ); } } } -- 2.39.2