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();