fixes in highlight code

This commit is contained in:
jriegel
2012-03-06 00:12:54 +01:00
committed by Stefan Tröger
parent 26afb6ee77
commit 72b49dbc6b
5 changed files with 28 additions and 11 deletions

View File

@@ -28,6 +28,7 @@
#include <Base/Placement.h>
#include "Item.h"
#include "ItemPy.h"
using namespace Assembly;
@@ -62,4 +63,13 @@ App::DocumentObjectExecReturn *Item::execute(void)
return App::DocumentObject::StdReturn;
}
PyObject *Item::getPyObject(void)
{
if (PythonObject.is(Py::_None())){
// ref counter is set to 1
PythonObject = Py::Object(new ItemPy(this),true);
}
return Py::new_reference_to(PythonObject);
}
}