mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Refactored RiuLineSegmnetQwtPlotCurve
Removed domain specific code Created RigCurveDataTools Use symbol to draw single values
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#include "RigWellLogCurveData.h"
|
||||
#include "RigCurveDataTools.h"
|
||||
|
||||
#include <cmath> // Needed for HUGE_VAL on Linux
|
||||
|
||||
@@ -19,7 +19,7 @@ TEST(RimWellLogExtractionCurveImplTest, StripOffInvalidValAtEndsOfVector)
|
||||
values.push_back(HUGE_VAL);
|
||||
|
||||
std::vector< std::pair<size_t, size_t> > valuesIntervals;
|
||||
RigWellLogCurveDataTestInterface::calculateIntervalsOfValidValues(values, &valuesIntervals);
|
||||
RigCurveDataTools::calculateIntervalsOfValidValues(values, &valuesIntervals);
|
||||
|
||||
EXPECT_EQ(1, static_cast<int>(valuesIntervals.size()));
|
||||
EXPECT_EQ(2, static_cast<int>(valuesIntervals[0].first));
|
||||
@@ -43,7 +43,7 @@ TEST(RimWellLogExtractionCurveImplTest, StripOffHugeValAtEndsAndInteriorOfVector
|
||||
values.push_back(HUGE_VAL);
|
||||
|
||||
std::vector< std::pair<size_t, size_t> > valuesIntervals;
|
||||
RigWellLogCurveDataTestInterface::calculateIntervalsOfValidValues(values, &valuesIntervals);
|
||||
RigCurveDataTools::calculateIntervalsOfValidValues(values, &valuesIntervals);
|
||||
|
||||
EXPECT_EQ(2, static_cast<int>(valuesIntervals.size()));
|
||||
EXPECT_EQ(2, static_cast<int>(valuesIntervals[0].first));
|
||||
|
||||
@@ -255,7 +255,9 @@ void RimWellLogExtractionCurve::updatePlotData()
|
||||
}
|
||||
}
|
||||
|
||||
m_qwtPlotCurve->setCurveData(m_curveData.p());
|
||||
m_qwtPlotCurve->setSamples(m_curveData->xPlotValues().data(), m_curveData->depthPlotValues().data(), static_cast<int>(m_curveData->xPlotValues().size()));
|
||||
m_qwtPlotCurve->setLineSegmentStartStopIndices(m_curveData->polylineStartStopIndices());
|
||||
|
||||
zoomAllOwnerTrackAndPlot();
|
||||
|
||||
if (m_ownerQwtTrack) m_ownerQwtTrack->replot();
|
||||
|
||||
@@ -114,7 +114,8 @@ void RimWellLogFileCurve::updatePlotData()
|
||||
}
|
||||
}
|
||||
|
||||
m_qwtPlotCurve->setCurveData(m_curveData.p());
|
||||
m_qwtPlotCurve->setSamples(m_curveData->xPlotValues().data(), m_curveData->depthPlotValues().data(), static_cast<int>(m_curveData->xPlotValues().size()));
|
||||
m_qwtPlotCurve->setLineSegmentStartStopIndices(m_curveData->polylineStartStopIndices());
|
||||
|
||||
zoomAllOwnerTrackAndPlot();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user