mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1182 Added a dummy point on first branch to better show the resulting alloaction
This commit is contained in:
parent
4a3ffb9238
commit
1f184837f1
@ -134,9 +134,14 @@ void RimWellFlowRateCurve::updateCurveAppearance()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimWellFlowRateCurve::updateStackedPlotData()
|
void RimWellFlowRateCurve::updateStackedPlotData()
|
||||||
{
|
{
|
||||||
|
RimWellLogPlot* wellLogPlot;
|
||||||
|
firstAncestorOrThisOfType(wellLogPlot);
|
||||||
|
|
||||||
RimWellLogTrack* wellLogTrack;
|
RimWellLogTrack* wellLogTrack;
|
||||||
firstAncestorOrThisOfType(wellLogTrack);
|
firstAncestorOrThisOfType(wellLogTrack);
|
||||||
|
|
||||||
|
bool isFirstTrack = (wellLogTrack == wellLogPlot->trackByIndex(0));
|
||||||
|
|
||||||
RimDefines::DepthUnitType displayUnit = RimDefines::UNIT_METER;
|
RimDefines::DepthUnitType displayUnit = RimDefines::UNIT_METER;
|
||||||
|
|
||||||
std::vector<double> depthValues = m_curveData->measuredDepthPlotValues(displayUnit);
|
std::vector<double> depthValues = m_curveData->measuredDepthPlotValues(displayUnit);
|
||||||
@ -156,12 +161,18 @@ void RimWellFlowRateCurve::updateStackedPlotData()
|
|||||||
if ( stCurve == this ) break;
|
if ( stCurve == this ) break;
|
||||||
zPos -= 1.0;
|
zPos -= 1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Add a dummy point for the zeroth connection to make the "end" distribution show better.
|
||||||
|
|
||||||
|
stackedValues.push_back(stackedValues.back());
|
||||||
|
depthValues.push_back(0.0);
|
||||||
|
std::vector< std::pair<size_t, size_t> > polyLineStartStopIndices = m_curveData->polylineStartStopIndices();
|
||||||
|
|
||||||
|
if ( isFirstTrack ) polyLineStartStopIndices.front().second += 2;
|
||||||
|
else polyLineStartStopIndices.front().second += 1;
|
||||||
|
|
||||||
|
|
||||||
m_qwtPlotCurve->setSamples(stackedValues.data(), depthValues.data(), static_cast<int>(depthValues.size()));
|
m_qwtPlotCurve->setSamples(stackedValues.data(), depthValues.data(), static_cast<int>(depthValues.size()));
|
||||||
|
|
||||||
std::vector< std::pair<size_t, size_t> > polyLineStartStopIndices = m_curveData->polylineStartStopIndices();
|
|
||||||
polyLineStartStopIndices.front().second += 1;
|
|
||||||
m_qwtPlotCurve->setLineSegmentStartStopIndices(polyLineStartStopIndices);
|
m_qwtPlotCurve->setLineSegmentStartStopIndices(polyLineStartStopIndices);
|
||||||
|
|
||||||
m_qwtPlotCurve->setZ(zPos);
|
m_qwtPlotCurve->setZ(zPos);
|
||||||
|
Loading…
Reference in New Issue
Block a user