mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-24 07:16:53 -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;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RivCrossSectionGeometryGenerator::isAnyGeometryPresent() const
|
||||
{
|
||||
if (m_triangleVxes->size() == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -137,6 +137,8 @@ public:
|
||||
const RivCrossSectionHexGridIntf* grid );
|
||||
|
||||
~RivCrossSectionGeometryGenerator();
|
||||
|
||||
bool isAnyGeometryPresent() const;
|
||||
|
||||
// Generate geometry
|
||||
cvf::ref<cvf::DrawableGeo> generateSurface();
|
||||
|
@ -83,14 +83,14 @@ void RivCrossSectionPartMgr::updateCellResultColor(size_t timeStepIndex)
|
||||
{
|
||||
if (m_crossSectionGenerator.isNull()) return;
|
||||
|
||||
if (!m_crossSectionGenerator->isAnyGeometryPresent()) return;
|
||||
|
||||
RimEclipseView* eclipseView;
|
||||
m_rimCrossSection->firstAnchestorOrThisOfType(eclipseView);
|
||||
|
||||
if (eclipseView)
|
||||
{
|
||||
RimEclipseCellColors* cellResultColors = eclipseView->cellResult();
|
||||
|
||||
|
||||
CVF_ASSERT(cellResultColors);
|
||||
|
||||
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(cellResultColors->porosityModel());
|
||||
|
Loading…
Reference in New Issue
Block a user