Summary Curve : Clear curve data if new data is invalid

This commit is contained in:
Magne Sjaastad 2016-11-25 13:37:05 +01:00
parent f9cf5cdb3c
commit 4a9a9500b7

View File

@ -404,9 +404,9 @@ void RimSummaryCurve::onLoadDataAndUpdate()
firstAncestorOrThisOfType(plot);
bool isLogCurve = plot->isLogarithmicScaleEnabled(this->yAxis());
if ( dateTimes.size())
if (dateTimes.size() > 0 && dateTimes.size() == values.size())
{
if ( plot->timeAxisProperties()->timeMode() == RimSummaryTimeAxisProperties::DATE)
if (plot->timeAxisProperties()->timeMode() == RimSummaryTimeAxisProperties::DATE)
{
m_qwtPlotCurve->setSamplesFromTimeTAndValues(dateTimes, values, isLogCurve);
}