X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.history%2Fsrc%2Forg%2Fsimantics%2Fhistory%2FHistorySamplerItem2.java;h=d5c3942a6ba35caa4c796f54526763b18ea7f20b;hp=73d89fa56a1aed8d73bed10724f12fe4417f4d40;hb=286183f3501ea34badb28d05bd8de954eff9b8bc;hpb=3add1aeb0df739aa27287b4e0770bed7d9fbb016 diff --git a/bundles/org.simantics.history/src/org/simantics/history/HistorySamplerItem2.java b/bundles/org.simantics.history/src/org/simantics/history/HistorySamplerItem2.java index 73d89fa56..d5c3942a6 100644 --- a/bundles/org.simantics.history/src/org/simantics/history/HistorySamplerItem2.java +++ b/bundles/org.simantics.history/src/org/simantics/history/HistorySamplerItem2.java @@ -41,6 +41,11 @@ public class HistorySamplerItem2 implements Comparable { this.items = items; this.chartDataId = identityHashCode; } + + public void flush() throws HistoryException { + if (collector != null) + collector.flush(); + } public void open() throws HistoryException { accessor = history.openStream(items[0].id, "r"); @@ -93,11 +98,11 @@ public class HistorySamplerItem2 implements Comparable { return true; } - private LevelItem getFormat(double pixelsPerSecond) throws HistoryException { + private LevelItem getFormat(double secondsPerPixel) throws HistoryException { LevelItem result = null; for (LevelItem format : items) { double interval = format.samplingInterval; - if (Double.isNaN( interval ) || interval <= pixelsPerSecond) { + if (Double.isNaN( interval ) || interval <= secondsPerPixel) { result = format; } else { break;