mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Refactored after review
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user