From 1884743a1b4d03de4f715a891434590a1d69215f Mon Sep 17 00:00:00 2001 From: robbr48 Date: Mon, 27 May 2024 11:06:12 +0200 Subject: [PATCH] Remove local variables with same name when adding system parameters --- HopsanGUI/HcomHandler.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/HopsanGUI/HcomHandler.cpp b/HopsanGUI/HcomHandler.cpp index 72e14e1a0..7bb2898a2 100644 --- a/HopsanGUI/HcomHandler.cpp +++ b/HopsanGUI/HcomHandler.cpp @@ -2122,6 +2122,9 @@ void HcomHandler::executeAddParameterCommand(const QString cmd) } CoreParameterData paramData(args[0], args[1], type); pContainer->setOrAddParameter(paramData); + + //Make sure to remove local variables with same name + mLocalVars.remove(args[0]); } }