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

This commit is contained in:
Rebecca Cox committed 2018-03-16 11:54:49 +01:00
1 parent 471d625051
commit dc6bbba848
2 files changed
+2 -2

No files matched your search

@@ -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());
}
@@ -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);
}