diff --git a/ApplicationCode/ProjectDataModel/Rim2dIntersectionView.cpp b/ApplicationCode/ProjectDataModel/Rim2dIntersectionView.cpp index 7fd42a6e77..9e67fbae24 100644 --- a/ApplicationCode/ProjectDataModel/Rim2dIntersectionView.cpp +++ b/ApplicationCode/ProjectDataModel/Rim2dIntersectionView.cpp @@ -602,12 +602,12 @@ void Rim2dIntersectionView::updateLegends() if ( eclView->cellResult()->isTernarySaturationSelected() ) { m_ternaryLegendConfig()->setTitle("Cell Result:\n"); - legend = m_ternaryLegendConfig()->legend(); + legend = m_ternaryLegendConfig()->titledOverlayFrame(); } else { m_legendConfig()->setTitle("Cell Result:\n" + eclView->cellResult()->resultVariableUiShortName()); - legend = m_legendConfig()->legend(); + legend = m_legendConfig()->titledOverlayFrame(); } } @@ -616,7 +616,7 @@ void Rim2dIntersectionView::updateLegends() m_legendConfig()->setUiValuesFromLegendConfig(geoView->cellResult()->legendConfig()); geoView->updateLegendTextAndRanges(m_legendConfig(), m_currentTimeStep()); - legend = m_legendConfig()->legend(); + legend = m_legendConfig()->titledOverlayFrame(); } if ( legend ) diff --git a/ApplicationCode/ProjectDataModel/RimEclipseView.cpp b/ApplicationCode/ProjectDataModel/RimEclipseView.cpp index 2fc1ddfac6..065882265c 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseView.cpp +++ b/ApplicationCode/ProjectDataModel/RimEclipseView.cpp @@ -1087,7 +1087,7 @@ void RimEclipseView::updateLegends() } } - m_viewer->addColorLegendToBottomLeftCorner(this->cellEdgeResult()->legendConfig()->legend()); + m_viewer->addColorLegendToBottomLeftCorner(this->cellEdgeResult()->legendConfig()->titledOverlayFrame()); this->cellEdgeResult()->legendConfig()->setTitle(QString("Edge Results: \n") + this->cellEdgeResult()->resultVariableUiShortName()); } else @@ -1102,9 +1102,9 @@ void RimEclipseView::updateLegends() { fractureColors()->updateLegendData(); - if (fractureColors()->isChecked() && stimPlanLegend->legend()) + if (fractureColors()->isChecked() && stimPlanLegend->titledOverlayFrame()) { - m_viewer->addColorLegendToBottomLeftCorner(stimPlanLegend->legend()); + m_viewer->addColorLegendToBottomLeftCorner(stimPlanLegend->titledOverlayFrame()); } } @@ -1113,7 +1113,7 @@ void RimEclipseView::updateLegends() updateVirtualConnectionLegendRanges(); RimRegularLegendConfig* virtLegend = m_virtualPerforationResult->legendConfig(); - m_viewer->addColorLegendToBottomLeftCorner(virtLegend->legend()); + m_viewer->addColorLegendToBottomLeftCorner(virtLegend->titledOverlayFrame()); } } @@ -1128,17 +1128,17 @@ void RimEclipseView::updateMinMaxValuesAndAddLegendToView(QString legendLabel, if (resultColors->hasResult() && resultColors->legendConfig()->showLegend()) { - m_viewer->addColorLegendToBottomLeftCorner(resultColors->legendConfig()->legend()); + m_viewer->addColorLegendToBottomLeftCorner(resultColors->legendConfig()->titledOverlayFrame()); resultColors->legendConfig()->setTitle(legendLabel + resultColors->resultVariableUiShortName()); } size_t maxTimeStepCount = cellResultsData->maxTimeStepCount(); if (resultColors->isTernarySaturationSelected() && maxTimeStepCount > 1) { - if (resultColors->ternaryLegendConfig->showLegend() && resultColors->ternaryLegendConfig->legend()) + if (resultColors->ternaryLegendConfig->showLegend() && resultColors->ternaryLegendConfig->titledOverlayFrame()) { resultColors->ternaryLegendConfig->setTitle(legendLabel); - m_viewer->addColorLegendToBottomLeftCorner(resultColors->ternaryLegendConfig->legend()); + m_viewer->addColorLegendToBottomLeftCorner(resultColors->ternaryLegendConfig->titledOverlayFrame()); } } } @@ -1598,10 +1598,10 @@ void RimEclipseView::resetLegendsInViewer() if (cellResultNormalLegendConfig) { - m_viewer->addColorLegendToBottomLeftCorner(cellResultNormalLegendConfig->legend()); + m_viewer->addColorLegendToBottomLeftCorner(cellResultNormalLegendConfig->titledOverlayFrame()); } - m_viewer->addColorLegendToBottomLeftCorner(this->cellEdgeResult()->legendConfig()->legend()); + m_viewer->addColorLegendToBottomLeftCorner(this->cellEdgeResult()->legendConfig()->titledOverlayFrame()); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ProjectDataModel/RimGeoMechView.cpp b/ApplicationCode/ProjectDataModel/RimGeoMechView.cpp index 51636b00db..842a3eb30b 100644 --- a/ApplicationCode/ProjectDataModel/RimGeoMechView.cpp +++ b/ApplicationCode/ProjectDataModel/RimGeoMechView.cpp @@ -364,7 +364,7 @@ void RimGeoMechView::resetLegendsInViewer() this->cellResult()->legendConfig->recreateLegend(); m_viewer->removeAllColorLegends(); - m_viewer->addColorLegendToBottomLeftCorner(this->cellResult()->legendConfig->legend()); + m_viewer->addColorLegendToBottomLeftCorner(this->cellResult()->legendConfig->titledOverlayFrame()); } //-------------------------------------------------------------------------------------------------- @@ -380,7 +380,7 @@ void RimGeoMechView::updateLegends() if (cellResult()->hasResult() && cellResult()->legendConfig()->showLegend()) { - m_viewer->addColorLegendToBottomLeftCorner(cellResult()->legendConfig->legend()); + m_viewer->addColorLegendToBottomLeftCorner(cellResult()->legendConfig->titledOverlayFrame()); } updateTensorLegendTextAndRanges(m_tensorResults->arrowColorLegendConfig(), m_currentTimeStep()); @@ -389,7 +389,7 @@ void RimGeoMechView::updateLegends() { if (tensorResults()->arrowColorLegendConfig()->showLegend()) { - m_viewer->addColorLegendToBottomLeftCorner(m_tensorResults->arrowColorLegendConfig->legend()); + m_viewer->addColorLegendToBottomLeftCorner(m_tensorResults->arrowColorLegendConfig->titledOverlayFrame()); } } } diff --git a/ApplicationCode/ProjectDataModel/RimRegularLegendConfig.cpp b/ApplicationCode/ProjectDataModel/RimRegularLegendConfig.cpp index 4579a91741..43b47f04d0 100644 --- a/ApplicationCode/ProjectDataModel/RimRegularLegendConfig.cpp +++ b/ApplicationCode/ProjectDataModel/RimRegularLegendConfig.cpp @@ -658,18 +658,6 @@ void RimRegularLegendConfig::setTitle(const QString& title) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -caf::TitledOverlayFrame* RimRegularLegendConfig::legend() -{ - if (m_currentScalarMapper == m_categoryMapper) - { - return m_categoryLegend.p(); - } - else - { - return m_scalarMapperLegend.p(); - } -} - bool RimRegularLegendConfig::showLegend() const { return m_showLegend; diff --git a/ApplicationCode/ProjectDataModel/RimRegularLegendConfig.h b/ApplicationCode/ProjectDataModel/RimRegularLegendConfig.h index 94deec64fe..ef659695f2 100644 --- a/ApplicationCode/ProjectDataModel/RimRegularLegendConfig.h +++ b/ApplicationCode/ProjectDataModel/RimRegularLegendConfig.h @@ -120,7 +120,6 @@ public: void setUiValuesFromLegendConfig(const RimRegularLegendConfig* otherLegendConfig); cvf::ScalarMapper* scalarMapper() { return m_currentScalarMapper.p(); } - caf::TitledOverlayFrame* legend(); bool showLegend() const; const caf::TitledOverlayFrame* titledOverlayFrame() const override; diff --git a/ApplicationCode/ProjectDataModel/RimTernaryLegendConfig.cpp b/ApplicationCode/ProjectDataModel/RimTernaryLegendConfig.cpp index 43d6e4fdce..6b5a73c1b2 100644 --- a/ApplicationCode/ProjectDataModel/RimTernaryLegendConfig.cpp +++ b/ApplicationCode/ProjectDataModel/RimTernaryLegendConfig.cpp @@ -328,19 +328,6 @@ void RimTernaryLegendConfig::defineUiOrdering(QString uiConfigName, caf::PdmUiOr //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -const RivTernarySaturationOverlayItem* RimTernaryLegendConfig::legend() const -{ - return m_legend.p(); -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RivTernarySaturationOverlayItem* RimTernaryLegendConfig::legend() -{ - return m_legend.p(); -} - bool RimTernaryLegendConfig::showLegend() const { return m_showLegend; diff --git a/ApplicationCode/ProjectDataModel/RimTernaryLegendConfig.h b/ApplicationCode/ProjectDataModel/RimTernaryLegendConfig.h index 03891e3383..b1eea5d12d 100644 --- a/ApplicationCode/ProjectDataModel/RimTernaryLegendConfig.h +++ b/ApplicationCode/ProjectDataModel/RimTernaryLegendConfig.h @@ -71,9 +71,6 @@ public: void recreateLegend(); - const RivTernarySaturationOverlayItem* legend() const; - RivTernarySaturationOverlayItem* legend(); - bool showLegend() const; void setTitle(const QString& title);