From f2877c3432aea0762de1e038f28cb785e708667d Mon Sep 17 00:00:00 2001 From: lempinen Date: Fri, 15 Feb 2013 14:59:51 +0000 Subject: [PATCH] Fixed Stock initialization with single number fill(number, size) to use dynamic EnumerationName.size instead of getting the size from the number of indexes defined to enumeration. This way it works also with overridden enumerations (fixes #4073) git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@26786 ac1ea38d-2e2b-0410-8846-a27921b304fc --- .../sysdyn/representation/expressions/StockExpression.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/expressions/StockExpression.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/expressions/StockExpression.java index 19f56201..13ee73ea 100644 --- a/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/expressions/StockExpression.java +++ b/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/expressions/StockExpression.java @@ -71,7 +71,7 @@ public class StockExpression extends Expression { } else { b.append(" zeros("); for(int i = 0; i < enumerations.size(); i++) { - b.append(enumerations.get(i).getEnumerationIndexes().size()); + b.append(enumerations.get(i).getName() + ".size"); if(i != enumerations.size() - 1) b.append(", "); } -- 2.47.1