LightApp_DataModel::open( theURL, theStudy, theFileList );
const int aStudyId = theStudy->id();
- bool res = false;
+ Data_DocError res = DocError_UnknownProblem;
if( theFileList.count() == 2 )
{
QString aTmpDir = theFileList[0];
}
catch(...)
{
- res = false;
+ res = DocError_UnknownProblem;
}
- if (!res)
+ if( res != DocError_OK )
{
module()->application()->putInfo( tr( "LOAD_ERROR" ) );
return false;
// if the document open was successful, the data model update happens
// in the set mode of the module
- if( !res )
+ if( res == DocError_OK )
update( aStudyId );
return true;
// save data to temporary files
LightApp_Study* aStudy = dynamic_cast<LightApp_Study*>( module()->application()->activeStudy() );
aTmpDir = aStudy->GetTmpDir( myStudyURL.toLatin1().constData(), isMultiFile ).c_str();
- aFileName = SUIT_Tools::file (myStudyURL, false ) + "_HYDRO.cbf";
+ aFileName = SUIT_Tools::file( myStudyURL, false ) + "_HYDRO.cbf";
QString aFullPath = aTmpDir + aFileName;
- bool res = HYDROData_Document::Document( aStudyId )->Save( (char*)aFullPath.toLatin1().constData() );
- if( !res )
+ Data_DocError res = HYDROData_Document::Document( aStudyId )->Save( (char*)aFullPath.toLatin1().constData() );
+ if( res != DocError_OK )
{
module()->application()->putInfo( tr( "SAVE_ERROR" ) );
return false;