From fd9fb9481ef0429335bb12d9f67b20d41076b429 Mon Sep 17 00:00:00 2001 From: wmayer Date: Sat, 26 Oct 2013 22:15:20 +0200 Subject: [PATCH] + Selection handling of Python view providers --- src/Gui/ViewProviderPythonFeature.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Gui/ViewProviderPythonFeature.cpp b/src/Gui/ViewProviderPythonFeature.cpp index d8f682649..8b217757f 100644 --- a/src/Gui/ViewProviderPythonFeature.cpp +++ b/src/Gui/ViewProviderPythonFeature.cpp @@ -47,6 +47,7 @@ # include # include # include +# include #endif #include "ViewProviderPythonFeature.h" @@ -375,7 +376,8 @@ SoDetail* ViewProviderPythonFeatureImp::getDetail(const char* name) const Py::Object det(method.apply(args)); void* ptr = 0; Base::Interpreter().convertSWIGPointerObj("pivy.coin", "SoDetail *", det.ptr(), &ptr, 0); - return reinterpret_cast(ptr); + SoDetail* detail = reinterpret_cast(ptr); + return detail ? detail->copy() : 0; } } }