#14797 Polygons: Add sphere display options and view update helpers

Add setters for line and sphere appearance on RimPolygon. Add RimPolygonCollection::updateViewsAfterPolygonsChanged(), shared with the contour map polygon tools, and a deferred variant that is safe to call from destructors.
This commit is contained in:
Magne Sjaastad committed 2026-09-30 16:26:04 +02:00
1 parent b28051e3d5
commit e0e05bcc6d
7 files changed
+154 -18

No files matched your search

@@ -125,24 +125,7 @@ void createPolygonObjects( const std::vector<std::vector<cvf::Vec3d>>& polygons
newPolygon->coordinatesChanged.send();
}
polygonCollection->updateAllRequiredEditors();
// Update polygon collections in all views so new polygons become visible
if ( auto project = RimProject::current() )
{
for ( auto* view : project->allViews() )
{
if ( auto* gridView = dynamic_cast<RimGridView*>( view ) )
{
if ( auto* polyCollection = gridView->polygonInViewCollection() )
{
polyCollection->updateFromPolygonCollection();
polyCollection->updateConnectedEditors();
}
gridView->scheduleCreateDisplayModelAndRedraw();
}
}
}
polygonCollection->updateViewsAfterPolygonsChanged();
}
} // namespace internal