From c41b3fb9e3e7184fc69dddd525720e0c1ebb8cf8 Mon Sep 17 00:00:00 2001 From: lempinen Date: Tue, 25 Jan 2011 12:59:23 +0000 Subject: [PATCH] git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@19508 ac1ea38d-2e2b-0410-8846-a27921b304fc --- .../sysdyn/ui/utils/ExpressionUtils.java | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/utils/ExpressionUtils.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/utils/ExpressionUtils.java index 097ff3cb..2caf1d20 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/utils/ExpressionUtils.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/utils/ExpressionUtils.java @@ -277,12 +277,19 @@ public class ExpressionUtils { if(v != null && v instanceof Enumeration) { boolean isFound = false; Enumeration e = (Enumeration)v; - for(EnumerationIndex ei : e.getEnumerationIndexes()) { - if(ei.getName().equals(et.image)) { - isFound = true; - break; + + if(enumeration.equals(et.image)) { + // The full enumeration + isFound = true; + } else { + for(EnumerationIndex ei : e.getEnumerationIndexes()) { + if(ei.getName().equals(et.image)) { + isFound = true; + break; + } } } + if(!isFound) { StringBuilder sb = new StringBuilder(); sb.append("Enumeration "); -- 2.47.1