+ make isReadOnly & isHidden of PropertyContainer non-virtual

This commit is contained in:
wmayer
2015-11-14 02:07:57 +01:00
parent 68fc3b5917
commit 0cddf520d0
8 changed files with 37 additions and 46 deletions

View File

@@ -171,7 +171,13 @@ PyObject* PropertyContainerPy::getGroupOfProperty(PyObject *args)
if (!PyArg_ParseTuple(args, "s", &pstr)) // convert args: Python->C
return NULL; // NULL triggers exception
const char* Group = getPropertyContainerPtr()->getPropertyGroup(pstr);
Property* prop = getPropertyContainerPtr()->getPropertyByName(pstr);
if (!prop) {
PyErr_Format(PyExc_AttributeError, "Property container has no property '%s'", pstr);
return 0;
}
const char* Group = getPropertyContainerPtr()->getPropertyGroup(prop);
if (Group)
return Py::new_reference_to(Py::String(Group));
else
@@ -184,7 +190,13 @@ PyObject* PropertyContainerPy::getDocumentationOfProperty(PyObject *args)
if (!PyArg_ParseTuple(args, "s", &pstr)) // convert args: Python->C
return NULL; // NULL triggers exception
const char* Group = getPropertyContainerPtr()->getPropertyDocumentation(pstr);
Property* prop = getPropertyContainerPtr()->getPropertyByName(pstr);
if (!prop) {
PyErr_Format(PyExc_AttributeError, "Property container has no property '%s'", pstr);
return 0;
}
const char* Group = getPropertyContainerPtr()->getPropertyDocumentation(prop);
if (Group)
return Py::new_reference_to(Py::String(Group));
else