From e46fa98950f0fde61621f135311f09debeb74e9b Mon Sep 17 00:00:00 2001 From: adv Date: Mon, 9 Sep 2013 05:59:49 +0000 Subject: [PATCH] Dump to Python operation for GUI part corrected. --- src/HYDROGUI/HYDROGUI_DataModel.cxx | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/HYDROGUI/HYDROGUI_DataModel.cxx b/src/HYDROGUI/HYDROGUI_DataModel.cxx index fc7a3838..09910953 100644 --- a/src/HYDROGUI/HYDROGUI_DataModel.cxx +++ b/src/HYDROGUI/HYDROGUI_DataModel.cxx @@ -54,6 +54,7 @@ #include #include +#include HYDROGUI_DataModel::HYDROGUI_DataModel( CAM_Module* theModule ) : LightApp_DataModel( theModule ) @@ -155,25 +156,24 @@ bool HYDROGUI_DataModel::dumpPython( const QString& theURL, bool isMultiFile, QStringList& theListOfFiles ) { + LightApp_DataModel::dumpPython( theURL, theStudy, isMultiFile, theListOfFiles ); + int aStudyId = theStudy->id(); + LightApp_Study* aStudy = ::qobject_cast( theStudy ); Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( aStudyId ); - if( aDocument.IsNull() ) + if ( aDocument.IsNull() || !aStudy ) return false; - QString aFileToExport = theURL; - - if ( isMultiFile ) - { - // each module's dump is written into a separate Python file - } - - - QApplication::setOverrideCursor( Qt::WaitCursor ); + QString aFileToExport = aStudy->GetTmpDir( theURL.toLatin1().constData(), isMultiFile ).c_str(); + aFileToExport += QString( QDir::separator() ) + "HYDRO.py"; bool aRes = aDocument->DumpToPython( aFileToExport ); - QApplication::restoreOverrideCursor(); + if ( aRes ) + { + theListOfFiles.append( aFileToExport ); + } return aRes; } -- 2.39.2