From 58bf235d5a017bb95b390e5f34bc6cec16089529 Mon Sep 17 00:00:00 2001 From: Kristian Bendiksen Date: Fri, 17 Nov 2023 10:19:54 +0100 Subject: [PATCH] 2D Intersection View: Fix crash on project restore. --- .../Rim2dIntersectionView.cpp | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/ApplicationLibCode/ProjectDataModel/Rim2dIntersectionView.cpp b/ApplicationLibCode/ProjectDataModel/Rim2dIntersectionView.cpp index 5830794a08..63e67d833c 100644 --- a/ApplicationLibCode/ProjectDataModel/Rim2dIntersectionView.cpp +++ b/ApplicationLibCode/ProjectDataModel/Rim2dIntersectionView.cpp @@ -644,17 +644,21 @@ void Rim2dIntersectionView::onUpdateDisplayModelForCurrentTimeStep() } } - if ( m_flatIntersectionPartMgr.notNull() && hasResults() ) - { - m_flatIntersectionPartMgr->updateCellResultColor( m_currentTimeStep, - m_legendConfig->scalarMapper(), - m_ternaryLegendConfig()->scalarMapper() ); - } - else + if ( m_flatIntersectionPartMgr.notNull() ) { - m_flatIntersectionPartMgr->applySingleColorEffect(); + if ( hasResults() ) + { + m_flatIntersectionPartMgr->updateCellResultColor( m_currentTimeStep, + m_legendConfig->scalarMapper(), + m_ternaryLegendConfig()->scalarMapper() ); + } + else + { + m_flatIntersectionPartMgr->applySingleColorEffect(); + } } } + //-------------------------------------------------------------------------------------------------- /// //--------------------------------------------------------------------------------------------------