Guard against cell results color update on inactive cross sections

This commit is contained in:
Jacob Støren
2015-11-22 15:07:34 +01:00
parent 5ec200c4fb
commit b5c226aac1

View File

@@ -57,7 +57,10 @@ void RimCrossSectionCollection::applySingleColorEffect()
for (size_t csIdx = 0; csIdx < m_crossSections.size(); ++csIdx)
{
RimCrossSection* cs = m_crossSections[csIdx];
cs->crossSectionPartMgr()->applySingleColorEffect();
if (cs->isActive)
{
cs->crossSectionPartMgr()->applySingleColorEffect();
}
}
}
@@ -69,7 +72,10 @@ void RimCrossSectionCollection::updateCellResultColor(size_t timeStepIndex)
for (size_t csIdx = 0; csIdx < m_crossSections.size(); ++csIdx)
{
RimCrossSection* cs = m_crossSections[csIdx];
cs->crossSectionPartMgr()->updateCellResultColor(timeStepIndex);
if (cs->isActive)
{
cs->crossSectionPartMgr()->updateCellResultColor(timeStepIndex);
}
}
}