From 55796623b5cd564931629273546699bb8c17c42e Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Fri, 4 May 2018 15:02:44 +0200 Subject: [PATCH] #2855 Tensor Calculations : Do nothing if tensor is unchecked --- ApplicationCode/ProjectDataModel/RimGeoMechView.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ApplicationCode/ProjectDataModel/RimGeoMechView.cpp b/ApplicationCode/ProjectDataModel/RimGeoMechView.cpp index 223d43c9cf..b848c785bb 100644 --- a/ApplicationCode/ProjectDataModel/RimGeoMechView.cpp +++ b/ApplicationCode/ProjectDataModel/RimGeoMechView.cpp @@ -383,11 +383,12 @@ void RimGeoMechView::updateLegends() m_viewer->addColorLegendToBottomLeftCorner(cellResult()->legendConfig->titledOverlayFrame()); } - updateTensorLegendTextAndRanges(m_tensorResults->arrowColorLegendConfig(), m_currentTimeStep()); - - if (tensorResults()->vectorColors() == RimTensorResults::RESULT_COLORS && tensorResults()->showTensors()) + if (tensorResults()->showTensors()) { - if (tensorResults()->arrowColorLegendConfig()->showLegend()) + updateTensorLegendTextAndRanges(m_tensorResults->arrowColorLegendConfig(), m_currentTimeStep()); + + if (tensorResults()->vectorColors() == RimTensorResults::RESULT_COLORS && + tensorResults()->arrowColorLegendConfig()->showLegend()) { m_viewer->addColorLegendToBottomLeftCorner(m_tensorResults->arrowColorLegendConfig->titledOverlayFrame()); }