#2035 Fix crash when bottom of well path ends after last well cell

Add symbols to curves
This commit is contained in:
Jacob Støren 2017-11-08 11:58:14 +01:00
parent 014dd9497a
commit aa45dd5fcd
2 changed files with 20 additions and 4 deletions

View File

@ -55,6 +55,7 @@
#include "RigMainGrid.h" #include "RigMainGrid.h"
#include "cafVecIjk.h" #include "cafVecIjk.h"
#include "RigAccWellFlowCalculator.h" #include "RigAccWellFlowCalculator.h"
#include "RimSummaryCurveAppearanceCalculator.h"
CAF_PDM_SOURCE_INIT(RimWellPltPlot, "WellPltPlot"); CAF_PDM_SOURCE_INIT(RimWellPltPlot, "WellPltPlot");
@ -924,8 +925,14 @@ public:
size_t globCellIdx = intersections[wpExIdx].globCellIndex; size_t globCellIdx = intersections[wpExIdx].globCellIndex;
auto it = globCellIdxToIdxInRftFile.find(globCellIdx); auto it = globCellIdxToIdxInRftFile.find(globCellIdx);
if (it == globCellIdxToIdxInRftFile.end()) continue; if (it == globCellIdxToIdxInRftFile.end())
{
if (wpExIdx == (intersections.size() - 1))
{
m_pipeBranchWellResultPoints.pop_back();
}
continue;
}
m_pipeBranchCLCoords.push_back(intersections[wpExIdx].startPoint); m_pipeBranchCLCoords.push_back(intersections[wpExIdx].startPoint);
m_pipeBranchMeasuredDepths.push_back(intersections[wpExIdx].startMD); m_pipeBranchMeasuredDepths.push_back(intersections[wpExIdx].startMD);
@ -1009,7 +1016,14 @@ public:
size_t globCellIdx = intersections[wpExIdx].globCellIndex; size_t globCellIdx = intersections[wpExIdx].globCellIndex;
auto it = globCellIdxToIdxInSimWellBranch.find(globCellIdx); auto it = globCellIdxToIdxInSimWellBranch.find(globCellIdx);
if (it == globCellIdxToIdxInSimWellBranch.end()) continue; if (it == globCellIdxToIdxInSimWellBranch.end())
{
if (wpExIdx == (intersections.size() - 1))
{
m_pipeBranchWellResultPoints.pop_back();
}
continue;
}
m_pipeBranchCLCoords.push_back(intersections[wpExIdx].startPoint); m_pipeBranchCLCoords.push_back(intersections[wpExIdx].startPoint);
m_pipeBranchMeasuredDepths.push_back(intersections[wpExIdx].startMD); m_pipeBranchMeasuredDepths.push_back(intersections[wpExIdx].startMD);
@ -1173,6 +1187,8 @@ void RimWellPltPlot::addStackedCurve(const QString& curveName,
curve->setColor(color); curve->setColor(color);
curve->setGroupId(curveGroupId); curve->setGroupId(curveGroupId);
curve->setDoFillCurve(doFillCurve); curve->setDoFillCurve(doFillCurve);
curve->setSymbol(RimSummaryCurveAppearanceCalculator::cycledSymbol(curveGroupId));
plotTrack->addCurve(curve); plotTrack->addCurve(curve);
curve->loadDataAndUpdate(true); curve->loadDataAndUpdate(true);

View File

@ -64,6 +64,7 @@ public:
static cvf::Color3f cycledBlueColor(int colorIndex); static cvf::Color3f cycledBlueColor(int colorIndex);
static cvf::Color3f cycledRedColor(int colorIndex); static cvf::Color3f cycledRedColor(int colorIndex);
static cvf::Color3f cycledBrownColor(int colorIndex); static cvf::Color3f cycledBrownColor(int colorIndex);
static RimPlotCurve::PointSymbolEnum cycledSymbol(int index);
private: private:
void setOneCurveAppearance(CurveAppearanceType appeaType, size_t totalCount, int appeaIdx, RimSummaryCurve* curve); void setOneCurveAppearance(CurveAppearanceType appeaType, size_t totalCount, int appeaIdx, RimSummaryCurve* curve);
@ -72,7 +73,6 @@ private:
RimPlotCurve::LineStyleEnum cycledLineStyle(int index); RimPlotCurve::LineStyleEnum cycledLineStyle(int index);
RimPlotCurve::PointSymbolEnum cycledSymbol(int index);
int cycledLineThickness(int index); int cycledLineThickness(int index);
float gradient(size_t totalCount, int index); float gradient(size_t totalCount, int index);