Refactored after review

This commit is contained in:
Gaute Lindkvist
2018-04-09 11:51:30 +02:00
parent fe56375be6
commit b6fb60115a
18 changed files with 62 additions and 67 deletions

View File

@@ -364,8 +364,7 @@ void RimGeoMechView::resetLegendsInViewer()
this->cellResult()->legendConfig->recreateLegend();
m_viewer->removeAllColorLegends();
m_viewer->addColorLegendToBottomLeftCorner(this->cellResult()->legendConfig->legend(),
this->backgroundColor());
m_viewer->addColorLegendToBottomLeftCorner(this->cellResult()->legendConfig->legend());
}
//--------------------------------------------------------------------------------------------------
@@ -379,18 +378,19 @@ void RimGeoMechView::updateLegends()
this->updateLegendTextAndRanges(cellResult()->legendConfig(), m_currentTimeStep());
if (cellResult()->hasResult())
if (cellResult()->hasResult() && cellResult()->legendConfig()->enableLegend())
{
m_viewer->addColorLegendToBottomLeftCorner(cellResult()->legendConfig->legend(),
this->backgroundColor());
m_viewer->addColorLegendToBottomLeftCorner(cellResult()->legendConfig->legend());
}
updateTensorLegendTextAndRanges(m_tensorResults->arrowColorLegendConfig(), m_currentTimeStep());
if (tensorResults()->vectorColors() == RimTensorResults::RESULT_COLORS && tensorResults()->showTensors())
{
m_viewer->addColorLegendToBottomLeftCorner(m_tensorResults->arrowColorLegendConfig->legend(),
this->backgroundColor());
if (tensorResults()->arrowColorLegendConfig()->enableLegend())
{
m_viewer->addColorLegendToBottomLeftCorner(m_tensorResults->arrowColorLegendConfig->legend());
}
}
}
}