mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2477 2D intersection view: add legend update
This commit is contained in:
@@ -421,8 +421,8 @@ void Rim2dIntersectionView::clampCurrentTimestep()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void Rim2dIntersectionView::updateCurrentTimeStep()
|
void Rim2dIntersectionView::updateCurrentTimeStep()
|
||||||
{
|
{
|
||||||
updateLegends();
|
|
||||||
update3dInfo();
|
update3dInfo();
|
||||||
|
updateLegends();
|
||||||
|
|
||||||
if ((this->hasUserRequestedAnimation() && this->hasResults()))
|
if ((this->hasUserRequestedAnimation() && this->hasResults()))
|
||||||
{
|
{
|
||||||
@@ -441,10 +441,8 @@ void Rim2dIntersectionView::updateCurrentTimeStep()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void Rim2dIntersectionView::updateLegends()
|
void Rim2dIntersectionView::updateLegends()
|
||||||
{
|
{
|
||||||
if (!m_viewer)
|
if (!m_viewer) return;
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
m_viewer->removeAllColorLegends();
|
m_viewer->removeAllColorLegends();
|
||||||
|
|
||||||
if (!hasResults()) return;
|
if (!hasResults()) return;
|
||||||
@@ -461,6 +459,7 @@ void Rim2dIntersectionView::updateLegends()
|
|||||||
{
|
{
|
||||||
m_legendConfig()->setUiValuesFromLegendConfig(eclView->cellResult()->legendConfig());
|
m_legendConfig()->setUiValuesFromLegendConfig(eclView->cellResult()->legendConfig());
|
||||||
m_ternaryLegendConfig()->setUiValuesFromLegendConfig(eclView->cellResult()->ternaryLegendConfig());
|
m_ternaryLegendConfig()->setUiValuesFromLegendConfig(eclView->cellResult()->ternaryLegendConfig());
|
||||||
|
eclView->cellResult()->updateLegendData(m_currentTimeStep(), m_legendConfig(), m_ternaryLegendConfig());
|
||||||
|
|
||||||
if ( eclView->cellResult()->isTernarySaturationSelected() )
|
if ( eclView->cellResult()->isTernarySaturationSelected() )
|
||||||
{
|
{
|
||||||
@@ -477,7 +476,7 @@ void Rim2dIntersectionView::updateLegends()
|
|||||||
if (geoView)
|
if (geoView)
|
||||||
{
|
{
|
||||||
m_legendConfig()->setUiValuesFromLegendConfig(geoView->cellResult()->legendConfig());
|
m_legendConfig()->setUiValuesFromLegendConfig(geoView->cellResult()->legendConfig());
|
||||||
|
|
||||||
geoView->updateLegendTextAndRanges(m_legendConfig(), m_currentTimeStep());
|
geoView->updateLegendTextAndRanges(m_legendConfig(), m_currentTimeStep());
|
||||||
legend = m_legendConfig()->legend();
|
legend = m_legendConfig()->legend();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user