getMap().getEditManagerInternal().setEditFeature(oldFeature, (Layer) oldLayer);
if (deselectCreatedFeature) {
EditBlackboard bb = geom.getEditBlackboard();
EditGeom newGeom = bb.newGeom(geom.getFeatureIDRef().get(), geom.getShapeType());
PrimitiveShape shell = geom.getShell();
for( org.locationtech.udig.tools.edit.support.Point point : shell ) {
bb.addPoint(point.getX(), point.getY(), newGeom.getShell());
}
List<PrimitiveShape> holes = geom.getHoles();
for( PrimitiveShape primitiveShape : holes ) {
PrimitiveShape newHole = newGeom.newHole();
for( Point point2 : primitiveShape ) {
bb.addPoint(point2.getX(), point2.getY(), newHole);
}
}
geom = newGeom;