Extension: Dont override PythonFeature proxy name

This commit is contained in:
Stefan Tröger
2016-09-09 11:17:41 +02:00
committed by wmayer
parent 7a2fed1b75
commit 07d749525f
2 changed files with 4 additions and 4 deletions

View File

@@ -175,12 +175,12 @@ public:
ExtensionPythonT() {
ExtensionT::m_isPythonExtension = true;
ADD_PROPERTY(Proxy,(Py::Object()));
ADD_PROPERTY(ExtensionProxy,(Py::Object()));
}
virtual ~ExtensionPythonT() {
}
PropertyPythonObject Proxy;
PropertyPythonObject ExtensionProxy;
};
typedef ExtensionPythonT<App::Extension> ExtensionPython;
@@ -190,7 +190,7 @@ typedef ExtensionPythonT<App::Extension> ExtensionPython;
Base::PyGILStateLocker lock;\
Py::Object result;\
try {\
Property* proxy = this->getPropertyByName("Proxy");\
Property* proxy = this->getPropertyByName("ExtensionProxy");\
if (proxy && proxy->getTypeId() == PropertyPythonObject::getClassTypeId()) {\
Py::Object feature = static_cast<PropertyPythonObject*>(proxy)->getValue();\
if (feature.hasAttr(std::string("function"))) {\

View File

@@ -152,7 +152,7 @@ PyObject* ExtensionContainerPy::addExtension(PyObject *args) {
ext->initExtension(getExtensionContainerPtr());
//set the proxy to allow python overrides
App::Property* pp = ext->getPropertyByName("Proxy");
App::Property* pp = ext->getPropertyByName("ExtensionProxy");
if(!pp) {
std::stringstream str;
str << "Accessing the proxy property failed!" << std::ends;