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%2Fimpl%2FCollectorImpl.java;h=e956b37117fcc365cbb85cf0e2b339752d814bcc;hp=87062a9dabecae759aa0f5dffd442a496af156e5;hb=b885083762a43ec97162a5f77df4fd5f85e28979;hpb=fee871302ad4c53ca2c2307bd13366d99116d930 diff --git a/bundles/org.simantics.history/src/org/simantics/history/impl/CollectorImpl.java b/bundles/org.simantics.history/src/org/simantics/history/impl/CollectorImpl.java index 87062a9da..e956b3711 100644 --- a/bundles/org.simantics.history/src/org/simantics/history/impl/CollectorImpl.java +++ b/bundles/org.simantics.history/src/org/simantics/history/impl/CollectorImpl.java @@ -815,11 +815,20 @@ public class CollectorImpl implements Collector { /// Extend existing band // Extend endTime value - if (!i.hasEndTime) { - i.current.setTime( time.getBinding(), time.getValue() ); - } else { - i.current.setEndTime( time.getBinding(), time.getValue() ); + + // This ensures that a value band's end time isn't the same + // as the next band's start time which makes it possible to + // know what are the timestamps between which the item value + // changed from a to b. This allows us to more correctly render + // steps and sloped lines accoring to the actual data. + if (!i.itemState.ooDeadband || isMinMaxFormat) { + if (!i.hasEndTime) { + i.current.setTime( time.getBinding(), time.getValue() ); + } else { + i.current.setEndTime( time.getBinding(), time.getValue() ); + } } + if (i.itemState.ooDeadband || isMinMaxFormat) { if (isValidValue) { // Set last value