From e7b224f0e1e4f2dafce59675753d822fae27166b Mon Sep 17 00:00:00 2001 From: vsv Date: Mon, 22 Oct 2018 16:42:06 +0300 Subject: [PATCH] Add file extension if it is not defined --- src/XGUI/XGUI_Workshop.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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(); } -- 2.39.2