X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.trend%2Fsrc%2Forg%2Fsimantics%2Ftrend%2Fimpl%2FItemNode.java;h=402d793f8cc4c34e4fbc15c5d4958f9a3635e26c;hb=refs%2Fchanges%2F44%2F2444%2F2;hp=c866d2cc290490d9f48804193de8926af128ed9e;hpb=1dfeb7d5c49b1391cd9d877e1eddab18995cb151;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.trend/src/org/simantics/trend/impl/ItemNode.java b/bundles/org.simantics.trend/src/org/simantics/trend/impl/ItemNode.java index c866d2cc2..402d793f8 100644 --- a/bundles/org.simantics.trend/src/org/simantics/trend/impl/ItemNode.java +++ b/bundles/org.simantics.trend/src/org/simantics/trend/impl/ItemNode.java @@ -248,7 +248,9 @@ public class ItemNode extends G2DNode implements TrendLayout { line.lineTo(maxX, ny); line.moveTo(x, y); } else { - line.lineTo(x, y); + if (x != currentX || y != currentY) { + line.lineTo(x, y); + } } } @@ -427,7 +429,11 @@ public class ItemNode extends G2DNode implements TrendLayout { } } - lineTo(x2, y2); + // gitlab #35: t2 > t1 ensure that the value band is + // rendered as a horizontal line until the the time when + // the band's value went out of dead-band. + if (flat || t2 > t1) + lineTo(x2, y2); // if(showBand) { // lineTo(x2, y2); @@ -468,7 +474,7 @@ public class ItemNode extends G2DNode implements TrendLayout { } // Binary signal - if (item.renderer == Renderer.Binary) { + else if (item.renderer == Renderer.Binary) { byte value = 0; if (vb.getValueBinding() instanceof BooleanBinding) { value = ((Boolean) vb.getValue(Bindings.BOOLEAN)) ? (byte)0 : (byte)1;