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

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

View File

@@ -66,8 +66,8 @@ public:
cvf::Color3f color() const;
bool isShowingCurve() const;
virtual bool isShowingTimeDependentResultInView(const Rim3dView* gridView) const { return showInView(gridView); }
virtual bool showInView(const Rim3dView* gridView) const { return isShowingCurve(); }
virtual bool isShowingTimeDependentResult() const { return isShowingCurve(); }
virtual bool showInView(const Rim3dView* gridView) const { return isShowingCurve(); }
virtual bool followAnimationTimeStep() const { return false; }
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;

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();
}
else if (dynamic_cast<const RimGeoMechCase*>(m_case()))
{
return m_geomResultDefinition->hasResult();
}
return m_eclipseResultDefinition->hasDynamicResult();
}
else if (dynamic_cast<const RimGeoMechCase*>(m_case()))
{
return m_geomResultDefinition->hasResult();
}
return false;
}
//--------------------------------------------------------------------------------------------------

View File

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