#1113, #1112 Made stacked curves. Now the accumulated well flow by connection graphs is up to speed.

This commit is contained in:
Jacob Støren
2017-02-01 19:17:56 +01:00
parent a4ce5f532d
commit 8e4e7f098f
7 changed files with 104 additions and 19 deletions

View File

@@ -34,6 +34,7 @@
#include "qwt_scale_engine.h"
#include <math.h>
#include "RimWellFlowRateCurve.h"
#define RI_LOGPLOTTRACK_MINX_DEFAULT -10.0
#define RI_LOGPLOTTRACK_MAXX_DEFAULT 100.0
@@ -311,6 +312,9 @@ void RimWellLogTrack::updateXZoomAndParentPlotDepthZoom()
//--------------------------------------------------------------------------------------------------
void RimWellLogTrack::updateXZoom()
{
std::vector<RimWellFlowRateCurve*> stackCurves = visibleStackedCurves();
for (RimWellFlowRateCurve* stCurve: stackCurves) stCurve->updateStackedPlotData();
if (!m_isAutoScaleXEnabled())
{
m_wellLogTrackPlotWidget->setXRange(m_visibleXRangeMin, m_visibleXRangeMax);
@@ -459,3 +463,21 @@ void RimWellLogTrack::setLogarithmicScale(bool enable)
updateAxisScaleEngine();
computeAndSetXRangeMinForLogarithmicScale();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<RimWellFlowRateCurve*> RimWellLogTrack::visibleStackedCurves()
{
std::vector<RimWellFlowRateCurve*> stackedCurves;
for (RimWellLogCurve* curve: curves)
{
if (curve && curve->isCurveVisible() )
{
RimWellFlowRateCurve* wfrCurve = dynamic_cast<RimWellFlowRateCurve*>(curve);
if (wfrCurve) stackedCurves.push_back(wfrCurve);
}
}
return stackedCurves;
}