Points: show now returns an GeoFeature object

* Added one return statement into try-catch block which returns the appropriate object (instead of `None`).
* Behaviour now in line with `Part.show`.

Example:

```Python
>>> import Points
>>> pp = Points.Points()
>>> pp.addPoints([(1,2,3),(4,5,6)])
>>> go = Points.show(pp)
>>> go  # Former behaviour was to return None
<GeoFeature object>
>>> go.ViewObject.ShapeColor = (1,0,0)
>>> go.ViewObject.ShapeColor = (1.,0.,0.)
>>> go.ViewObject.PointSize = 20
```
This commit is contained in:
joha2
2023-04-02 19:29:13 +02:00
committed by wwmayer
parent afbacfeecd
commit 2d3293306b

View File

@@ -398,6 +398,7 @@ private:
Points::Feature* pcFeature = static_cast<Points::Feature*>(pcDoc->addObject("Points::Feature", name));
// copy the data
pcFeature->Points.setValue(*(pPoints->getPointKernelPtr()));
return Py::asObject(pcFeature->getPyObject());
}
catch (const Base::Exception& e) {
throw Py::RuntimeError(e.what());