From 0007682f03efdf7deeb2cfefe866b47e1541bee2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacob=20St=C3=B8ren?= Date: Wed, 15 Nov 2017 17:08:09 +0100 Subject: [PATCH] Use RiaRftPltCurveDefinition in Plt Plot --- .../ProjectDataModel/Flow/RimWellPltPlot.cpp | 18 +++++++++--------- .../ProjectDataModel/Flow/RimWellPltPlot.h | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ApplicationCode/ProjectDataModel/Flow/RimWellPltPlot.cpp b/ApplicationCode/ProjectDataModel/Flow/RimWellPltPlot.cpp index e2fd4f07a9..f8e637c4cd 100644 --- a/ApplicationCode/ProjectDataModel/Flow/RimWellPltPlot.cpp +++ b/ApplicationCode/ProjectDataModel/Flow/RimWellPltPlot.cpp @@ -261,9 +261,9 @@ void RimWellPltPlot::updateWidgetTitleWindowTitle() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -std::set < std::pair> RimWellPltPlot::selectedCurveDefs() const +std::set < RiaRftPltCurveDefinition > RimWellPltPlot::selectedCurveDefs() const { - std::set> curveDefs; + std::set curveDefs; const QString simWellName = RimWellPlotTools::simWellName(m_wellPathName); std::set selectedTimeSteps(m_selectedTimeSteps.v().begin(), m_selectedTimeSteps.v().end()); @@ -279,7 +279,7 @@ std::set < std::pair> RimWellPltPlot::selecte { if ( selectedTimeSteps.count(time) ) { - curveDefs.insert(std::make_pair(addr, time)); + curveDefs.insert(RiaRftPltCurveDefinition(addr, time)); } } } @@ -291,7 +291,7 @@ std::set < std::pair> RimWellPltPlot::selecte { if ( selectedTimeSteps.count(time) ) { - curveDefs.insert(std::make_pair(addr, time)); + curveDefs.insert(RiaRftPltCurveDefinition(addr, time)); } } } @@ -301,7 +301,7 @@ std::set < std::pair> RimWellPltPlot::selecte { if ( selectedTimeSteps.count(addr.wellLogFile()->date()) ) { - curveDefs.insert(std::make_pair(addr, addr.wellLogFile()->date())); + curveDefs.insert(RiaRftPltCurveDefinition(addr, addr.wellLogFile()->date())); } } } @@ -518,7 +518,7 @@ public: void RimWellPltPlot::syncCurvesFromUiSelection() { RimWellLogTrack* plotTrack = m_wellLogPlot->trackByIndex(0); - const std::set>& curveDefs = selectedCurveDefs(); + const std::set& curveDefs = selectedCurveDefs(); setPlotXAxisTitles(plotTrack); @@ -532,14 +532,14 @@ void RimWellPltPlot::syncCurvesFromUiSelection() RimWellPath* wellPath = RimWellPlotTools::wellPathByWellPathNameOrSimWellName(m_wellPathName); // Add curves - for (const std::pair& curveDefToAdd : curveDefs) + for (const RiaRftPltCurveDefinition& curveDefToAdd : curveDefs) { std::set selectedPhases = m_phaseSelectionMode == FLOW_TYPE_PHASE_SPLIT ? std::set(m_phases().begin(), m_phases().end()) : std::set({ FLOW_PHASE_TOTAL }); - RifDataSourceForRftPlt sourceDef = curveDefToAdd.first; - QDateTime timeStep = curveDefToAdd.second; + RifDataSourceForRftPlt sourceDef = curveDefToAdd.address(); + QDateTime timeStep = curveDefToAdd.timeStep(); std::unique_ptr resultPointCalc; diff --git a/ApplicationCode/ProjectDataModel/Flow/RimWellPltPlot.h b/ApplicationCode/ProjectDataModel/Flow/RimWellPltPlot.h index 549fb0c534..558bcda229 100644 --- a/ApplicationCode/ProjectDataModel/Flow/RimWellPltPlot.h +++ b/ApplicationCode/ProjectDataModel/Flow/RimWellPltPlot.h @@ -107,7 +107,7 @@ private: void syncSourcesIoFieldFromGuiField(); void syncCurvesFromUiSelection(); - std::set> selectedCurveDefs() const; + std::set selectedCurveDefs() const; void addStackedCurve(const QString& tracerName, const std::vector& depthValues, const std::vector& accFlow,