Polygon updates (#11298)

* Make menus similar for polygon and polygonInView
* Crash fix: Iterator might be invalidated by erase, reorder operations.
* Update pick editor after reload
* Do not enable edit if polygon is read only
* Make sure filter and intersection geometry is updated after a reload
* Make sure other pick editors are updated when polygon in view is changed
This commit is contained in:
jonjenssen
2024-03-18 14:31:06 +01:00
committed by GitHub
parent 853d68df8b
commit 2001c94a39
10 changed files with 53 additions and 14 deletions

View File

@@ -233,6 +233,13 @@ void RimPolygonInView::updatePolygonFromTargets()
points.push_back( target->targetPointXYZ() );
}
m_polygon->setPointsInDomainCoords( points );
// update other pick editors, make sure we don't update ourselves
m_polygon->coordinatesChanged.block( this );
m_polygon->coordinatesChanged.send();
m_polygon->coordinatesChanged.unblock( this );
m_polygon->objectChanged.send();
}
}
@@ -374,7 +381,7 @@ void RimPolygonInView::uiOrderingForLocalPolygon( QString uiConfigName, caf::Pdm
//--------------------------------------------------------------------------------------------------
void RimPolygonInView::appendMenuItems( caf::CmdFeatureMenuBuilder& menuBuilder ) const
{
if ( m_polygon() ) m_polygon->appendMenuItems( menuBuilder );
RimPolygon::appendPolygonMenuItems( menuBuilder );
}
//--------------------------------------------------------------------------------------------------