Polygon: make polygon from python editable.

This commit is contained in:
Kristian Bendiksen committed 2025-05-07 12:07:31 +02:00
1 parent e5dc280ce0
commit 67ebdc5f07
1 file changed
+2 -1
@@ -48,7 +48,7 @@ caf::PdmObjectHandle* RimcPolygonCollection_createPolygon::execute()
QString name = m_name();
std::vector<cvf::Vec3d> coords = m_coordinates();
RimPolygon* polygon = polygonCollection->appendUserDefinedPolygon();
RimPolygon* polygon = new RimPolygon();
if ( !name.isEmpty() )
{
polygon->setName( name );
@@ -56,6 +56,7 @@ caf::PdmObjectHandle* RimcPolygonCollection_createPolygon::execute()
polygon->setPointsInDomainCoords( coords );
polygonCollection->addUserDefinedPolygon( polygon );
polygonCollection->updateConnectedEditors();
return polygon;