From 1a62516931ee2b90418475fad21bd9927a755d5f Mon Sep 17 00:00:00 2001 From: robbr48 Date: Mon, 27 May 2024 10:52:36 +0200 Subject: [PATCH] Fix FMI exports for models without HMF extension --- HopsanGUI/GUIObjects/GUIContainerObject.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HopsanGUI/GUIObjects/GUIContainerObject.cpp b/HopsanGUI/GUIObjects/GUIContainerObject.cpp index 2c2761e20..a3d77c75f 100644 --- a/HopsanGUI/GUIObjects/GUIContainerObject.cpp +++ b/HopsanGUI/GUIObjects/GUIContainerObject.cpp @@ -3388,7 +3388,7 @@ void SystemObject::exportToFMU(QString savePath, int version, ArchitectureEnumT } //Save model to hmf in export directory - mpModelWidget->saveTo(savePath+"/"+mModelFileInfo.fileName().replace(" ", "_")); + mpModelWidget->saveTo(savePath+"/"+mModelFileInfo.completeBaseName().replace(" ", "_")+".hmf"); auto spGenerator = createDefaultExportGenerator(); spGenerator->setCompilerPath(gpConfig->getCompilerPath(arch));