From 9ad45d41f8ffc180c6c7dc70aa7bec661de34cb5 Mon Sep 17 00:00:00 2001 From: jkauttio Date: Tue, 27 May 2014 12:53:52 +0000 Subject: [PATCH] Fix a bug which prevented some operations on variables with shadows fixes #4913 git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@29551 ac1ea38d-2e2b-0410-8846-a27921b304fc --- .../src/org/simantics/sysdyn/ui/utils/NameValidator.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/utils/NameValidator.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/utils/NameValidator.java index b86d035b..25d7090b 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/utils/NameValidator.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/utils/NameValidator.java @@ -18,6 +18,7 @@ import org.simantics.sysdyn.manager.SysdynModel; import org.simantics.sysdyn.representation.Configuration; import org.simantics.sysdyn.representation.IElement; import org.simantics.sysdyn.representation.Module; +import org.simantics.sysdyn.representation.Shadow; import org.simantics.sysdyn.representation.Sheet; import org.simantics.sysdyn.representation.Variable; import org.simantics.sysdyn.ui.modelica.ModelicaSourceViewerConfiguration; @@ -329,7 +330,7 @@ public abstract class NameValidator { return true; IElement current = sysdynModel.getElement(resource); for(IElement e : configuration.getElements()) { - if(e instanceof Variable) { + if(e instanceof Variable && !(e instanceof Shadow)) { Variable v = (Variable) e; if(!v.equals(current) && v.getName() != null && v.getName().equals(name)) { return true; -- 2.47.1