]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Add file extension if it is not defined
authorvsv <vsv@opencascade.com>
Mon, 22 Oct 2018 13:42:06 +0000 (16:42 +0300)
committervsv <vsv@opencascade.com>
Mon, 22 Oct 2018 13:42:06 +0000 (16:42 +0300)
src/XGUI/XGUI_Workshop.cpp

index d1a11f68297f26eca63905457de6e015eda82d5c..735d8d51668d0c51c51c9f3ed014bda90c35b13f 100755 (executable)
@@ -1081,11 +1081,14 @@ bool XGUI_Workshop::onSaveAs()
     return false;
   myCurrentFile = QFileDialog::getSaveFileName(desktop(), tr("Select name to save file..."),
     QString(), MyFilter);
-#ifndef HAVE_SALOME
   if (!myCurrentFile.isNull()) {
+    if (!myCurrentFile.endsWith(".opp")) {
+      myCurrentFile += ".opp";
+    }
+  }
+#ifndef HAVE_SALOME
     myMainWindow->setCurrentDir(myCurrentFile, false);
     myMainWindow->setModifiedState(false);
-  }
 #endif
   return onSave();
 }