#2612 Tensor Vectors: Hide legend when Tensor Vectors are turned off

This commit is contained in:
Rebecca Cox 2018-03-16 11:54:45 +01:00
parent 471d625051
commit dc6bbba848
2 changed files with 2 additions and 2 deletions

View File

@ -385,7 +385,7 @@ void RimGeoMechView::updateLegends()
updateTensorLegendTextAndRanges(m_tensorResults->legendConfig(), m_currentTimeStep());
if (tensorResults()->vectorColors() == RimTensorResults::RESULT_COLORS)
if (tensorResults()->vectorColors() == RimTensorResults::RESULT_COLORS && tensorResults()->showTensors())
{
m_viewer->addColorLegendToBottomLeftCorner(m_tensorResults->legendConfig->legend());
}

View File

@ -93,7 +93,6 @@ RimTensorResults::RimTensorResults()
//--------------------------------------------------------------------------------------------------
RimTensorResults::~RimTensorResults()
{
delete legendConfig;
}
//--------------------------------------------------------------------------------------------------
@ -110,6 +109,7 @@ RigFemResultAddress RimTensorResults::selectedTensorResult() const
void RimTensorResults::setShowTensors(bool enableTensors)
{
m_showTensors = enableTensors;
updateConnectedEditors();
updateUiIconFromState(enableTensors);
}