From: vsv Date: Tue, 20 Nov 2018 10:44:37 +0000 (+0300) Subject: Make native file extension .shaper for SALOME version X-Git-Tag: End2018~163 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3dce28e00b37dbc9320e812dcd95c2f76ed1e5c8;p=modules%2Fshaper.git Make native file extension .shaper for SALOME version --- diff --git a/src/SHAPERGUI/SHAPERGUI_DataModel.cpp b/src/SHAPERGUI/SHAPERGUI_DataModel.cpp index 304dc616c..015fde137 100644 --- a/src/SHAPERGUI/SHAPERGUI_DataModel.cpp +++ b/src/SHAPERGUI/SHAPERGUI_DataModel.cpp @@ -122,7 +122,7 @@ bool SHAPERGUI_DataModel::save(QStringList& theFiles) aMgr->blockAutoUpdate(false); //aWorkShop->saveDocument(QString(aTmpDir.c_str()), aFileNames); - aWorkShop->setCurrentDataFile(aTmp + "shaper.opp"); + aWorkShop->setCurrentDataFile(aTmp + "shaper.shaper"); aWorkShop->onSave(); QString aName = aWorkShop->currentDataFile(); std::string aa = aName.toStdString(); diff --git a/src/XGUI/XGUI_Workshop.cpp b/src/XGUI/XGUI_Workshop.cpp index 2e135c8d9..54d240e86 100755 --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@ -170,8 +170,15 @@ QString XGUI_Workshop::MOVE_TO_END_COMMAND = QObject::tr("Move to the end"); //#define DEBUG_FEATURE_NAME //#define DEBUG_CLEAN_HISTORY - +#ifdef HAVE_SALOME +static QString MyFilter(QObject::tr("OpenParts files (*.shaper *.opp)")); +static QString MyFilter2(QObject::tr("OpenParts files (*.shaper)")); +static QString MyExtension(".shaper"); +#else static QString MyFilter(QObject::tr("OpenParts files (*.opp)")); +static QString MyFilter2(QObject::tr("OpenParts files (*.opp)")); +static QString MyExtension(".opp"); +#endif //****************************************************** @@ -1082,10 +1089,10 @@ bool XGUI_Workshop::onSaveAs() if(!myOperationMgr->abortAllOperations(XGUI_OperationMgr::XGUI_InformationMessage)) return false; myCurrentFile = QFileDialog::getSaveFileName(desktop(), tr("Select name to save file..."), - QString(), MyFilter); + QString(), MyFilter2); if (!myCurrentFile.isNull()) { - if (!myCurrentFile.endsWith(".opp")) { - myCurrentFile += ".opp"; + if (!myCurrentFile.endsWith(MyExtension)) { + myCurrentFile += MyExtension; } } else