From 70b6db37c001ce317de6cc8443dc547669ddf947 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 0e89d767f..d19c4ea8e 100644 --- a/HopsanGUI/HcomHandler.cpp +++ b/HopsanGUI/HcomHandler.cpp @@ -2111,6 +2111,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]); } }