From 36d8b2fec7a1f7cdc226368419ec1e86a89f7a83 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Tue, 20 Feb 2024 10:20:24 +0100 Subject: [PATCH] Mark as obsolete --- .../CellFilters/RimPolygonFilter.cpp | 16 ++++++++-------- .../CellFilters/RimPolygonFilter.h | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ApplicationLibCode/ProjectDataModel/CellFilters/RimPolygonFilter.cpp b/ApplicationLibCode/ProjectDataModel/CellFilters/RimPolygonFilter.cpp index aebc27bb82..f57def4991 100644 --- a/ApplicationLibCode/ProjectDataModel/CellFilters/RimPolygonFilter.cpp +++ b/ApplicationLibCode/ProjectDataModel/CellFilters/RimPolygonFilter.cpp @@ -88,11 +88,11 @@ RimPolygonFilter::RimPolygonFilter() m_editPolygonButton.uiCapability()->setUiEditorTypeName( caf::PdmUiPushButtonEditor::uiEditorTypeName() ); m_editPolygonButton.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::HIDDEN ); - CAF_PDM_InitFieldNoDefault( &m_targets, "Targets", "Targets" ); - m_targets.uiCapability()->setUiTreeChildrenHidden( true ); - m_targets.uiCapability()->setUiTreeHidden( true ); - m_targets.uiCapability()->setUiHidden( true ); - m_targets.xmlCapability()->setIOWritable( false ); + CAF_PDM_InitFieldNoDefault( &m_OBSOLETE_targets, "Targets", "Targets" ); + m_OBSOLETE_targets.uiCapability()->setUiTreeChildrenHidden( true ); + m_OBSOLETE_targets.uiCapability()->setUiTreeHidden( true ); + m_OBSOLETE_targets.uiCapability()->setUiHidden( true ); + m_OBSOLETE_targets.xmlCapability()->setIOWritable( false ); CAF_PDM_InitFieldNoDefault( &m_closePolygon, "ClosePolygon", "Closed Polygon" ); m_closePolygon.registerGetMethod( this, &RimPolygonFilter::isPolygonClosed ); @@ -162,17 +162,16 @@ void RimPolygonFilter::initAfterRead() RimCellFilter::initAfterRead(); // Move existing polygons to global polygon - if ( !m_targets.empty() ) + if ( !m_OBSOLETE_targets.empty() ) { std::vector points; - for ( const auto& target : m_targets ) + for ( const auto& target : m_OBSOLETE_targets ) { points.push_back( target->targetPointXYZ() ); } auto polygon = RimPolygonTools::createNewPolygon(); polygon->setPointsInDomainCoords( points ); - polygon->setIsClosed( true ); setPolygonAndConnectSignals( polygon ); @@ -180,6 +179,7 @@ void RimPolygonFilter::initAfterRead() auto polygonInView = RimPolygonTools::findPolygonInView( polygon, this ); if ( polygonInView ) { + // Call set polygon to make sure the well targets are updated polygonInView->setPolygon( polygon ); } } diff --git a/ApplicationLibCode/ProjectDataModel/CellFilters/RimPolygonFilter.h b/ApplicationLibCode/ProjectDataModel/CellFilters/RimPolygonFilter.h index a901dff273..e5af9c877d 100644 --- a/ApplicationLibCode/ProjectDataModel/CellFilters/RimPolygonFilter.h +++ b/ApplicationLibCode/ProjectDataModel/CellFilters/RimPolygonFilter.h @@ -121,6 +121,6 @@ class RimPolygonFilter : public RimCellFilter RimCellFilterIntervalTool m_intervalTool; - caf::PdmChildArrayField m_targets; + caf::PdmChildArrayField m_OBSOLETE_targets; caf::PdmProxyValueField m_closePolygon; };