#2091 Cross Plot : Improve interface of RiuLineSegmentQwtPlotCurve

Remove duplicate code
This commit is contained in:
Magne Sjaastad
2017-11-08 07:38:25 +01:00
parent baa9a47b92
commit 0502b95d86
7 changed files with 84 additions and 83 deletions

View File

@@ -145,7 +145,7 @@ void RimAsciiDataCurve::onLoadDataAndUpdate(bool updateParentPlot)
{
if (plot->timeAxisProperties()->timeMode() == RimSummaryTimeAxisProperties::DATE)
{
m_qwtPlotCurve->setSamplesFromTimeTAndValues(dateTimes, values, isLogCurve);
m_qwtPlotCurve->setSamplesFromTimeTAndYValues(dateTimes, values, isLogCurve);
}
else
{
@@ -161,13 +161,13 @@ void RimAsciiDataCurve::onLoadDataAndUpdate(bool updateParentPlot)
}
}
m_qwtPlotCurve->setSamplesFromTimeAndValues(times, values, isLogCurve);
m_qwtPlotCurve->setSamplesFromXValuesAndYValues(times, values, isLogCurve);
}
}
else
{
m_qwtPlotCurve->setSamplesFromTimeTAndValues(std::vector<time_t>(), std::vector<double>(), isLogCurve);
m_qwtPlotCurve->setSamplesFromTimeTAndYValues(std::vector<time_t>(), std::vector<double>(), isLogCurve);
}
updateZoomInParentPlot();

View File

@@ -407,7 +407,7 @@ void RimSummaryCurve::onLoadDataAndUpdate(bool updateParentPlot)
{
if (plot->timeAxisProperties()->timeMode() == RimSummaryTimeAxisProperties::DATE)
{
m_qwtPlotCurve->setSamplesFromTimeTAndValues(dateTimes, values, isLogCurve);
m_qwtPlotCurve->setSamplesFromTimeTAndYValues(dateTimes, values, isLogCurve);
}
else
{
@@ -423,13 +423,13 @@ void RimSummaryCurve::onLoadDataAndUpdate(bool updateParentPlot)
}
}
m_qwtPlotCurve->setSamplesFromTimeAndValues(times, values, isLogCurve);
m_qwtPlotCurve->setSamplesFromXValuesAndYValues(times, values, isLogCurve);
}
}
else
{
m_qwtPlotCurve->setSamplesFromTimeTAndValues(std::vector<time_t>(), std::vector<double>(), isLogCurve);
m_qwtPlotCurve->setSamplesFromTimeTAndYValues(std::vector<time_t>(), std::vector<double>(), isLogCurve);
}
if ( updateParentPlot && m_parentQwtPlot)