Fixed history data collection minmax stream updates and plot rendering
[simantics/platform.git] / bundles / org.simantics.trend / src / org / simantics / trend / impl / ItemNode.java
index c866d2cc290490d9f48804193de8926af128ed9e..699b441ca226c916aa6e725aa8c10a6df6c09b53 100644 (file)
@@ -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,8 @@ public class ItemNode extends G2DNode implements TrendLayout {
                                                                }
                                                        }
 
-                                                       lineTo(x2, y2);
+                                                       if (flat)
+                                                               lineTo(x2, y2);
                                                        
 //                                                     if(showBand) {
 //                                                             lineTo(x2, y2);
@@ -468,7 +471,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;