From f114f68a939f3c4e6624fe1d9bccc894248b2d16 Mon Sep 17 00:00:00 2001 From: Robert Braun Date: Fri, 1 Dec 2023 10:34:14 +0100 Subject: [PATCH] Automatically rename FMIWrappers to FMU base file name --- HopsanGUI/GUIObjects/GUIComponent.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/HopsanGUI/GUIObjects/GUIComponent.cpp b/HopsanGUI/GUIObjects/GUIComponent.cpp index 3e98c2e44..e5fae736d 100644 --- a/HopsanGUI/GUIObjects/GUIComponent.cpp +++ b/HopsanGUI/GUIObjects/GUIComponent.cpp @@ -204,6 +204,8 @@ bool Component::setParameterValue(QString name, QString value, bool force) //Adjust icon scale this->getAppearanceData()->setIconScale(qMax(qMax(inputs.size(),outputs.size())/3.0,1.0), UserGraphics); + mpParentSystemObject->renameModelObject(this->getName(), QFileInfo(getParameterValue("path")).baseName()); + //Refresh appearance this->refreshAppearance();