From: vsv Date: Mon, 22 Oct 2018 13:42:06 +0000 (+0300) Subject: Add file extension if it is not defined X-Git-Tag: V9_2_0a2~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e7b224f0e1e4f2dafce59675753d822fae27166b;p=modules%2Fshaper.git Add file extension if it is not defined --- diff --git a/src/XGUI/XGUI_Workshop.cpp b/src/XGUI/XGUI_Workshop.cpp index d1a11f682..735d8d516 100755 --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@ -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(); }