From 10257e3bfb7bc573c57aaee6c455abec131d2b4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacob=20St=C3=B8ren?= Date: Thu, 21 Nov 2019 10:05:56 +0100 Subject: [PATCH] Fix missing rebuild of intersections in geomech view Fix missing ternary legend reset Fix missing regular legend reset in geomech view --- ApplicationCode/ProjectDataModel/RimEclipseView.cpp | 1 + ApplicationCode/ProjectDataModel/RimGeoMechView.cpp | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/ApplicationCode/ProjectDataModel/RimEclipseView.cpp b/ApplicationCode/ProjectDataModel/RimEclipseView.cpp index 0f8d9b64f8..90747432c1 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseView.cpp +++ b/ApplicationCode/ProjectDataModel/RimEclipseView.cpp @@ -1853,6 +1853,7 @@ void RimEclipseView::onResetLegendsInViewer() this->separateIntersectionResultsCollection()->intersectionResultsDefinitions() ) { sepInterResDef->regularLegendConfig()->recreateLegend(); + sepInterResDef->ternaryLegendConfig()->recreateLegend(); } nativeOrOverrideViewer()->removeAllColorLegends(); diff --git a/ApplicationCode/ProjectDataModel/RimGeoMechView.cpp b/ApplicationCode/ProjectDataModel/RimGeoMechView.cpp index 8657dd4df1..d9e9f78444 100644 --- a/ApplicationCode/ProjectDataModel/RimGeoMechView.cpp +++ b/ApplicationCode/ProjectDataModel/RimGeoMechView.cpp @@ -38,8 +38,11 @@ #include "RimGeoMechPropertyFilterCollection.h" #include "RimGridCollection.h" #include "RimIntersectionCollection.h" +#include "RimIntersectionResultDefinition.h" +#include "RimIntersectionResultsDefinitionCollection.h" #include "RimRegularLegendConfig.h" #include "RimTensorResults.h" +#include "RimTernaryLegendConfig.h" #include "RimViewLinker.h" #include "RimViewNameConfig.h" @@ -286,6 +289,7 @@ void RimGeoMechView::onCreateDisplayModel() // Cross sections m_crossSectionVizModel->removeAllParts(); + m_crossSectionCollection->rebuildGeometry(); m_crossSectionCollection->appendPartsToModel( *this, m_crossSectionVizModel.p(), scaleTransform() ); nativeOrOverrideViewer()->addStaticModelOnce( m_crossSectionVizModel.p(), isUsingOverrideViewer() ); @@ -423,6 +427,13 @@ void RimGeoMechView::onResetLegendsInViewer() { this->cellResult()->legendConfig->recreateLegend(); + for ( RimIntersectionResultDefinition* sepInterResDef : + this->separateIntersectionResultsCollection()->intersectionResultsDefinitions() ) + { + sepInterResDef->regularLegendConfig()->recreateLegend(); + sepInterResDef->ternaryLegendConfig()->recreateLegend(); + } + nativeOrOverrideViewer()->removeAllColorLegends(); }