mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#689) Do not try to update colors if no intersection geometry is present
This commit is contained in:
parent
de41755320
commit
71cb7115eb
@ -1280,6 +1280,21 @@ const RimCrossSection* RivCrossSectionGeometryGenerator::crossSection() const
|
|||||||
return m_crossSection;
|
return m_crossSection;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
bool RivCrossSectionGeometryGenerator::isAnyGeometryPresent() const
|
||||||
|
{
|
||||||
|
if (m_triangleVxes->size() == 0)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -138,6 +138,8 @@ public:
|
|||||||
|
|
||||||
~RivCrossSectionGeometryGenerator();
|
~RivCrossSectionGeometryGenerator();
|
||||||
|
|
||||||
|
bool isAnyGeometryPresent() const;
|
||||||
|
|
||||||
// Generate geometry
|
// Generate geometry
|
||||||
cvf::ref<cvf::DrawableGeo> generateSurface();
|
cvf::ref<cvf::DrawableGeo> generateSurface();
|
||||||
cvf::ref<cvf::DrawableGeo> createMeshDrawable();
|
cvf::ref<cvf::DrawableGeo> createMeshDrawable();
|
||||||
|
@ -83,14 +83,14 @@ void RivCrossSectionPartMgr::updateCellResultColor(size_t timeStepIndex)
|
|||||||
{
|
{
|
||||||
if (m_crossSectionGenerator.isNull()) return;
|
if (m_crossSectionGenerator.isNull()) return;
|
||||||
|
|
||||||
|
if (!m_crossSectionGenerator->isAnyGeometryPresent()) return;
|
||||||
|
|
||||||
RimEclipseView* eclipseView;
|
RimEclipseView* eclipseView;
|
||||||
m_rimCrossSection->firstAnchestorOrThisOfType(eclipseView);
|
m_rimCrossSection->firstAnchestorOrThisOfType(eclipseView);
|
||||||
|
|
||||||
if (eclipseView)
|
if (eclipseView)
|
||||||
{
|
{
|
||||||
RimEclipseCellColors* cellResultColors = eclipseView->cellResult();
|
RimEclipseCellColors* cellResultColors = eclipseView->cellResult();
|
||||||
|
|
||||||
|
|
||||||
CVF_ASSERT(cellResultColors);
|
CVF_ASSERT(cellResultColors);
|
||||||
|
|
||||||
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(cellResultColors->porosityModel());
|
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(cellResultColors->porosityModel());
|
||||||
|
Loading…
Reference in New Issue
Block a user