From: srn Date: Thu, 23 Mar 2006 11:34:46 +0000 (+0000) Subject: BugID: IPAL11296, change a operator order to make a correct chain of calls X-Git-Tag: for_sharm~17 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d30396d7e8e4aafc528aa6da15a08daacbb87304;p=modules%2Fgui.git BugID: IPAL11296, change a operator order to make a correct chain of calls --- diff --git a/src/SalomeApp/SalomeApp_Study.cxx b/src/SalomeApp/SalomeApp_Study.cxx index 8b154b433..7f78f1494 100644 --- a/src/SalomeApp/SalomeApp_Study.cxx +++ b/src/SalomeApp/SalomeApp_Study.cxx @@ -224,13 +224,14 @@ bool SalomeApp_Study::saveDocumentAs( const QString& theFileName ) if( !resMgr ) return false; - bool isMultiFile = resMgr->booleanValue( "Study", "multi_file", false ), - 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 isMultiFile = resMgr->booleanValue( "Study", "multi_file", false ); + bool isAscii = resMgr->booleanValue( "Study", "ascii_file", false ); + bool res = (isAscii ? + SalomeApp_Application::studyMgr()->SaveAsASCII( theFileName.latin1(), studyDS(), isMultiFile ) : + SalomeApp_Application::studyMgr()->SaveAs ( theFileName.latin1(), studyDS(), isMultiFile )) + && CAM_Study::saveDocumentAs( theFileName ); + + res = res && saveStudyData(theFileName); if ( res ) emit saved( this ); @@ -264,11 +265,11 @@ bool SalomeApp_Study::saveDocument() if( !resMgr ) return false; - bool isMultiFile = resMgr->booleanValue( "Study", "multi_file", false ), - isAscii = resMgr->booleanValue( "Study", "ascii_file", false ), - res = isAscii ? - SalomeApp_Application::studyMgr()->SaveASCII( studyDS(), isMultiFile ) : - SalomeApp_Application::studyMgr()->Save ( studyDS(), isMultiFile ) && CAM_Study::saveDocument(); + bool isMultiFile = resMgr->booleanValue( "Study", "multi_file", false ); + bool isAscii = resMgr->booleanValue( "Study", "ascii_file", false ); + bool res = (isAscii ? + SalomeApp_Application::studyMgr()->SaveASCII( studyDS(), isMultiFile ) : + SalomeApp_Application::studyMgr()->Save ( studyDS(), isMultiFile )) && CAM_Study::saveDocument(); res = res && saveStudyData(studyName()); if ( res )