Fix crash in 3d well log curve rendering.

This commit is contained in:
Gaute Lindkvist 2018-09-04 12:57:55 +02:00
parent 5a2ecf25c2
commit ea8721f6ff
5 changed files with 12 additions and 17 deletions

View File

@ -88,9 +88,8 @@ void Riv3dWellLogPlanePartMgr::appendPlaneToModel(cvf::ModelBasicList*
} }
for (Rim3dWellLogCurve* rim3dWellLogCurve : m_wellPath->rim3dWellLogCurveCollection()->vectorOf3dWellLogCurves()) for (Rim3dWellLogCurve* rim3dWellLogCurve : m_wellPath->rim3dWellLogCurveCollection()->vectorOf3dWellLogCurves())
{ {
if (rim3dWellLogCurve->isShowingTimeDependentResultInView(m_gridView) != isStaticResult) if (rim3dWellLogCurve->showInView(m_gridView) && rim3dWellLogCurve->isShowingTimeDependentResult() != isStaticResult)
{ {
append3dWellLogCurveToModel(model, append3dWellLogCurveToModel(model,
displayCoordTransform, displayCoordTransform,
wellPathClipBoundingBox, wellPathClipBoundingBox,

View File

@ -419,7 +419,7 @@ bool Rim3dView::hasVisibleTimeStepDependent3dWellLogCurves() const
wellPathCollection()->descendantsIncludingThisOfType(wellLogCurves); wellPathCollection()->descendantsIncludingThisOfType(wellLogCurves);
for (const Rim3dWellLogCurve* curve : wellLogCurves) for (const Rim3dWellLogCurve* curve : wellLogCurves)
{ {
if (curve->isShowingTimeDependentResultInView(this)) if (curve->showInView(this) && curve->isShowingTimeDependentResult())
{ {
return true; return true;
} }

View File

@ -66,8 +66,8 @@ public:
cvf::Color3f color() const; cvf::Color3f color() const;
bool isShowingCurve() const; bool isShowingCurve() const;
virtual bool isShowingTimeDependentResultInView(const Rim3dView* gridView) const { return showInView(gridView); } virtual bool isShowingTimeDependentResult() const { return isShowingCurve(); }
virtual bool showInView(const Rim3dView* gridView) const { return isShowingCurve(); } virtual bool showInView(const Rim3dView* gridView) const { return isShowingCurve(); }
virtual bool followAnimationTimeStep() const { return false; } virtual bool followAnimationTimeStep() const { return false; }
virtual void curveValuesAndMds(std::vector<double>* values, std::vector<double>* measuredDepthValues) const = 0; virtual void curveValuesAndMds(std::vector<double>* values, std::vector<double>* measuredDepthValues) const = 0;
virtual void curveValuesAndMdsAtTimeStep(std::vector<double>* values, std::vector<double>* measuredDepthValues, int timeStep) const; virtual void curveValuesAndMdsAtTimeStep(std::vector<double>* values, std::vector<double>* measuredDepthValues, int timeStep) const;

View File

@ -378,20 +378,16 @@ double Rim3dWellLogExtractionCurve::rkbDiff() const
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
bool Rim3dWellLogExtractionCurve::isShowingTimeDependentResultInView(const Rim3dView* gridView) const bool Rim3dWellLogExtractionCurve::isShowingTimeDependentResult() const
{ {
if (showInView(gridView)) if (dynamic_cast<const RimEclipseCase*>(m_case()))
{ {
if (dynamic_cast<const RimEclipseCase*>(m_case())) return m_eclipseResultDefinition->hasDynamicResult();
{ }
return m_eclipseResultDefinition->hasDynamicResult(); else if (dynamic_cast<const RimGeoMechCase*>(m_case()))
} {
else if (dynamic_cast<const RimGeoMechCase*>(m_case())) return m_geomResultDefinition->hasResult();
{
return m_geomResultDefinition->hasResult();
}
} }
return false;
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@ -54,7 +54,7 @@ public:
virtual QString createAutoName() const override; virtual QString createAutoName() const override;
double rkbDiff() const; double rkbDiff() const;
virtual bool isShowingTimeDependentResultInView(const Rim3dView* gridView) const override; virtual bool isShowingTimeDependentResult() const override;
virtual bool showInView(const Rim3dView* gridView) const override; virtual bool showInView(const Rim3dView* gridView) const override;