]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Make native file extension .shaper for SALOME version
authorvsv <vsv@opencascade.com>
Tue, 20 Nov 2018 10:44:37 +0000 (13:44 +0300)
committervsv <vsv@opencascade.com>
Tue, 20 Nov 2018 10:44:37 +0000 (13:44 +0300)
src/SHAPERGUI/SHAPERGUI_DataModel.cpp
src/XGUI/XGUI_Workshop.cpp

index 304dc616c4b9652c432d99e6e65736658ce22567..015fde137be414ec2f8c02312835fb2ba1c307a1 100644 (file)
@@ -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();
index 2e135c8d93d7a3c9417f0a3c2e99568756fe1559..54d240e86af08d985e6f09c0b9751dd4bf4a69b4 100755 (executable)
@@ -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