(#689) Do not try to update colors if no intersection geometry is present

This commit is contained in:
Magne Sjaastad 2015-12-03 12:54:13 +01:00
parent de41755320
commit 71cb7115eb
3 changed files with 19 additions and 2 deletions

View File

@ -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;
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@ -137,6 +137,8 @@ public:
const RivCrossSectionHexGridIntf* grid );
~RivCrossSectionGeometryGenerator();
bool isAnyGeometryPresent() const;
// Generate geometry
cvf::ref<cvf::DrawableGeo> generateSurface();

View File

@ -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());