From b5c226aac141d84400381015cdefca32d35658e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacob=20St=C3=B8ren?= Date: Sun, 22 Nov 2015 15:07:34 +0100 Subject: [PATCH] Guard against cell results color update on inactive cross sections --- .../ProjectDataModel/RimCrossSectionCollection.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ApplicationCode/ProjectDataModel/RimCrossSectionCollection.cpp b/ApplicationCode/ProjectDataModel/RimCrossSectionCollection.cpp index 98a97ce7b9..bb6a17ca2d 100644 --- a/ApplicationCode/ProjectDataModel/RimCrossSectionCollection.cpp +++ b/ApplicationCode/ProjectDataModel/RimCrossSectionCollection.cpp @@ -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); + } } }