mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-26 23:20:29 -05:00
#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:
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
|
||||
|
||||
Reference in new issue
Block a user