From f04c56df01bdfecb0e13c0976be92bf9bba0a6d2 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Fri, 9 Dec 2016 21:15:24 +0100 Subject: [PATCH] #559 Linked views : Removed obsolete storage of RimView --- ApplicationCode/ProjectDataModel/RimCellEdgeColors.cpp | 1 - ApplicationCode/ProjectDataModel/RimEclipseCellColors.cpp | 8 -------- ApplicationCode/ProjectDataModel/RimEclipseView.cpp | 1 - ApplicationCode/ProjectDataModel/RimGeoMechView.cpp | 3 --- ApplicationCode/ProjectDataModel/RimLegendConfig.cpp | 4 ++-- ApplicationCode/ProjectDataModel/RimLegendConfig.h | 4 ---- .../ProjectDataModel/RimTernaryLegendConfig.cpp | 4 ++-- ApplicationCode/ProjectDataModel/RimTernaryLegendConfig.h | 3 --- 8 files changed, 4 insertions(+), 24 deletions(-) diff --git a/ApplicationCode/ProjectDataModel/RimCellEdgeColors.cpp b/ApplicationCode/ProjectDataModel/RimCellEdgeColors.cpp index 0dbae8b5d4..28b0310171 100644 --- a/ApplicationCode/ProjectDataModel/RimCellEdgeColors.cpp +++ b/ApplicationCode/ProjectDataModel/RimCellEdgeColors.cpp @@ -90,7 +90,6 @@ RimCellEdgeColors::~RimCellEdgeColors() void RimCellEdgeColors::setReservoirView(RimEclipseView* ownerReservoirView) { m_reservoirView = ownerReservoirView; - this->m_legendConfig()->setReservoirView(ownerReservoirView); m_singleVarEdgeResultColors->setReservoirView(ownerReservoirView); } diff --git a/ApplicationCode/ProjectDataModel/RimEclipseCellColors.cpp b/ApplicationCode/ProjectDataModel/RimEclipseCellColors.cpp index 72dc13cdec..827bd2be61 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseCellColors.cpp +++ b/ApplicationCode/ProjectDataModel/RimEclipseCellColors.cpp @@ -135,7 +135,6 @@ void RimEclipseCellColors::changeLegendConfig(QString resultVarNameOfNewLegend) if (!found) { RimLegendConfig* newLegend = new RimLegendConfig; - newLegend->setReservoirView(m_reservoirView); newLegend->resultVariableName = resultVarNameOfNewLegend; m_legendConfigData.push_back(newLegend); @@ -225,13 +224,6 @@ void RimEclipseCellColors::setReservoirView(RimEclipseView* ownerReservoirView) this->setEclipseCase(ownerReservoirView->eclipseCase()); m_reservoirView = ownerReservoirView; - - for (size_t i = 0; i < m_legendConfigData.size(); i++) - { - m_legendConfigData[i]->setReservoirView(ownerReservoirView); - } - - this->ternaryLegendConfig()->setReservoirView(ownerReservoirView); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ProjectDataModel/RimEclipseView.cpp b/ApplicationCode/ProjectDataModel/RimEclipseView.cpp index d7d6542251..6425f5403d 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseView.cpp +++ b/ApplicationCode/ProjectDataModel/RimEclipseView.cpp @@ -124,7 +124,6 @@ RimEclipseView::RimEclipseView() this->cellResult()->setReservoirView(this); this->cellEdgeResult()->setReservoirView(this); - this->cellEdgeResult()->legendConfig()->setReservoirView(this); this->cellEdgeResult()->legendConfig()->setColorRangeMode(RimLegendConfig::PINK_WHITE); this->faultResultSettings()->setReservoirView(this); diff --git a/ApplicationCode/ProjectDataModel/RimGeoMechView.cpp b/ApplicationCode/ProjectDataModel/RimGeoMechView.cpp index 9842376684..00df52619e 100644 --- a/ApplicationCode/ProjectDataModel/RimGeoMechView.cpp +++ b/ApplicationCode/ProjectDataModel/RimGeoMechView.cpp @@ -84,9 +84,6 @@ RimGeoMechView::RimGeoMechView(void) m_propertyFilterCollection = new RimGeoMechPropertyFilterCollection(); m_propertyFilterCollection.uiCapability()->setUiHidden(true); - //this->cellResult()->setReservoirView(this); - this->cellResult()->legendConfig()->setReservoirView(this); - m_scaleTransform = new cvf::Transform(); m_vizLogic = new RivGeoMechVizLogic(this); } diff --git a/ApplicationCode/ProjectDataModel/RimLegendConfig.cpp b/ApplicationCode/ProjectDataModel/RimLegendConfig.cpp index 6db35dbec7..320a58b700 100644 --- a/ApplicationCode/ProjectDataModel/RimLegendConfig.cpp +++ b/ApplicationCode/ProjectDataModel/RimLegendConfig.cpp @@ -193,9 +193,9 @@ void RimLegendConfig::fieldChangedByUi(const caf::PdmFieldHandle* changedField, { viewLinker->updateCellResult(); } - } - if (m_reservoirView) m_reservoirView->updateCurrentTimeStepAndRedraw(); + view->updateCurrentTimeStepAndRedraw(); + } } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ProjectDataModel/RimLegendConfig.h b/ApplicationCode/ProjectDataModel/RimLegendConfig.h index c151dfe2c1..9553b654ce 100644 --- a/ApplicationCode/ProjectDataModel/RimLegendConfig.h +++ b/ApplicationCode/ProjectDataModel/RimLegendConfig.h @@ -57,8 +57,6 @@ public: RimLegendConfig(); virtual ~RimLegendConfig(); - void setReservoirView(RimView* ownerReservoirView) {m_reservoirView = ownerReservoirView; } - caf::PdmField resultVariableName; // Used internally to describe the variable this legend setup is used for enum RangeModeType @@ -130,8 +128,6 @@ private: void setUiValuesFromLegendConfig(const RimLegendConfig* otherLegendConfig); private: - caf::PdmPointer m_reservoirView; - cvf::ref m_linDiscreteScalarMapper; cvf::ref m_logDiscreteScalarMapper; cvf::ref m_logSmoothScalarMapper; diff --git a/ApplicationCode/ProjectDataModel/RimTernaryLegendConfig.cpp b/ApplicationCode/ProjectDataModel/RimTernaryLegendConfig.cpp index 207163eec3..68e2e3ad93 100644 --- a/ApplicationCode/ProjectDataModel/RimTernaryLegendConfig.cpp +++ b/ApplicationCode/ProjectDataModel/RimTernaryLegendConfig.cpp @@ -164,9 +164,9 @@ void RimTernaryLegendConfig::fieldChangedByUi(const caf::PdmFieldHandle* changed { viewLinker->updateCellResult(); } + + view->updateCurrentTimeStepAndRedraw(); } - - if (m_reservoirView) m_reservoirView->updateCurrentTimeStepAndRedraw(); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ProjectDataModel/RimTernaryLegendConfig.h b/ApplicationCode/ProjectDataModel/RimTernaryLegendConfig.h index 3a3e5e7163..544a980f36 100644 --- a/ApplicationCode/ProjectDataModel/RimTernaryLegendConfig.h +++ b/ApplicationCode/ProjectDataModel/RimTernaryLegendConfig.h @@ -65,8 +65,6 @@ public: RimTernaryLegendConfig(); virtual ~RimTernaryLegendConfig(); - void setReservoirView(RimEclipseView* ownerReservoirView) {m_reservoirView = ownerReservoirView; } - void setAutomaticRanges(TernaryArrayIndex ternaryIndex, double globalMin, double globalMax, double localMin, double localMax); void ternaryRanges(double& soilLower, double& soilUpper, double& sgasLower, double& sgasUpper, double& swatLower, double& swatUpper) const; @@ -109,7 +107,6 @@ private: std::vector m_localAutoMax; std::vector m_localAutoMin; - caf::PdmPointer m_reservoirView; cvf::ref m_legend; cvf::ref m_scalarMapper; };