diff options
-rw-r--r-- | src/Authoring/Studio/_Win/Workspace/Dialogs.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Authoring/Studio/_Win/Workspace/Dialogs.cpp b/src/Authoring/Studio/_Win/Workspace/Dialogs.cpp index ccd34bd7..7761387c 100644 --- a/src/Authoring/Studio/_Win/Workspace/Dialogs.cpp +++ b/src/Authoring/Studio/_Win/Workspace/Dialogs.cpp @@ -861,7 +861,13 @@ std::pair<Qt3DSFile, bool> CDialogs::GetSaveAsChoice(const QString &inDialogTitl while (theShowDialog && theFileDlg.exec()) { theShowDialog = false; - theFile = Qt3DSFile(Q3DStudio::CString::fromQString(theFileDlg.selectedFiles().front())); + QString selectedName = theFileDlg.selectedFiles().front(); + + // Make sure file name has correct extension + if (!selectedName.endsWith(theFileExt)) + selectedName.append(theFileExt); + + theFile = Qt3DSFile(Q3DStudio::CString::fromQString(selectedName)); m_LastSaveFile = theFile.GetAbsolutePath(); // customising a dialog box will force us to use non-native. |