From 52088156221cdc9e009acc129ac351c58f25ac19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rnar=20Grip=20Fj=C3=A6r?= Date: Thu, 1 Jun 2017 12:54:37 +0200 Subject: [PATCH] #1520 Ensure cell results are updated when well path visibility is toggled --- ApplicationCode/ProjectDataModel/RimWellPath.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/ApplicationCode/ProjectDataModel/RimWellPath.cpp b/ApplicationCode/ProjectDataModel/RimWellPath.cpp index 57c0db8f0f..2beb1f8093 100644 --- a/ApplicationCode/ProjectDataModel/RimWellPath.cpp +++ b/ApplicationCode/ProjectDataModel/RimWellPath.cpp @@ -240,8 +240,15 @@ void RimWellPath::fieldChangedByUi(const caf::PdmFieldHandle* changedField, cons partMgr()->scheduleGeometryRegen(); RimProject* proj; - this->firstAncestorOrThisOfType(proj); - if (proj) proj->createDisplayModelAndRedrawAllViews(); + this->firstAncestorOrThisOfTypeAsserted(proj); + if (changedField == &showWellPath) + { + proj->removeResult(RimDefines::DYNAMIC_NATIVE, RimDefines::completionTypeResultName()); + } + else + { + proj->createDisplayModelAndRedrawAllViews(); + } } //--------------------------------------------------------------------------------------------------