Salome HOME
Fix for the issue #2753 : error when dump/load script
[modules/shaper.git] / src / XGUI / XGUI_Workshop.cpp
index 7e5f8bf3c0d632574199a1a499fc58fcce789596..823d8fe8885d56219c2d64bb417de44914666571 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
 
-
-static QString MyFilter(QObject::tr("OpenParts files (*.opp)"));
+#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);;All files (*.*)"));
+static QString MyFilter2(QObject::tr("OpenParts files (*.opp)"));
+static QString MyExtension(".opp");
+#endif
 
 
 //******************************************************
@@ -303,6 +310,8 @@ XGUI_Workshop::~XGUI_Workshop(void)
 
   delete myDisplayer;
   delete myDataModelXMLReader;
+  delete mySelectionActivate;
+  delete myMenuMgr;
   clearTemporaryDir();
 }
 
@@ -433,7 +442,7 @@ void XGUI_Workshop::initMenu()
 
   salomeConnector()->addDesktopMenuSeparator("MEN_DESK_EDIT");
 
-  aAction = salomeConnector()->addDesktopCommand("AUTOCOMPUTE_CMD", tr("Block auto-apply"),
+  aAction = salomeConnector()->addDesktopCommand("AUTOCOMPUTE_CMD", tr("Auto rebuild"),
                                               tr("Blocks immediate apply of modifications"),
                                               QIcon(":pictures/autoapply.png"), QKeySequence(),
                                               false, "MEN_DESK_EDIT");
@@ -1082,10 +1091,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