From 412fe929bcc950e0fea3c6285d25358e1a602b49 Mon Sep 17 00:00:00 2001 From: Tuukka Lehtonen Date: Thu, 20 Apr 2017 13:54:20 +0300 Subject: [PATCH] Fixed TrendNode.setTrendSpec to properly update item axes The previous code was not counting the set axes hidden/unhidden between successive TrendNode.setTrendSpec calls. refs #7155 Change-Id: I7aa9d8dec76d4328d2f4d12dfd0f9523fea71f2c --- .../src/org/simantics/trend/impl/TrendNode.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bundles/org.simantics.trend/src/org/simantics/trend/impl/TrendNode.java b/bundles/org.simantics.trend/src/org/simantics/trend/impl/TrendNode.java index 575af21f5..ddbd4934e 100644 --- a/bundles/org.simantics.trend/src/org/simantics/trend/impl/TrendNode.java +++ b/bundles/org.simantics.trend/src/org/simantics/trend/impl/TrendNode.java @@ -243,7 +243,8 @@ public class TrendNode extends G2DParentNode implements TrendLayout { TObjectIntMap map = new TObjectIntHashMap<>(items.size(), 0.5f, -1); for (int i = 0; i < items.size(); ++i) { TrendItem it = items.get(i); - map.put(it.groupItemId, i); + if (!it.hidden) + map.put(it.groupItemId, i); } return map; } -- 2.43.2