Spreadsheet: Made SheetPython inherit python object from Sheet
This commit is contained in:
parent
f532e60f30
commit
4de1b39b4f
|
@ -33,6 +33,7 @@
|
||||||
#include <App/Application.h>
|
#include <App/Application.h>
|
||||||
#include <App/Document.h>
|
#include <App/Document.h>
|
||||||
#include <App/DynamicProperty.h>
|
#include <App/DynamicProperty.h>
|
||||||
|
#include <App/FeaturePythonPyImp.h>
|
||||||
#include <Base/Exception.h>
|
#include <Base/Exception.h>
|
||||||
#include <Base/Placement.h>
|
#include <Base/Placement.h>
|
||||||
#include <Base/Reader.h>
|
#include <Base/Reader.h>
|
||||||
|
@ -1345,6 +1346,13 @@ PROPERTY_SOURCE_TEMPLATE(Spreadsheet::SheetPython, Spreadsheet::Sheet)
|
||||||
template<> const char* Spreadsheet::SheetPython::getViewProviderName(void) const {
|
template<> const char* Spreadsheet::SheetPython::getViewProviderName(void) const {
|
||||||
return "SpreadsheetGui::ViewProviderSheet";
|
return "SpreadsheetGui::ViewProviderSheet";
|
||||||
}
|
}
|
||||||
|
template<> PyObject* Spreadsheet::SheetPython::getPyObject(void) {
|
||||||
|
if (PythonObject.is(Py::_None())) {
|
||||||
|
// ref counter is set to 1
|
||||||
|
PythonObject = Py::Object(new FeaturePythonPyT<Spreadsheet::SheetPy>(this),true);
|
||||||
|
}
|
||||||
|
return Py::new_reference_to(PythonObject);
|
||||||
|
}
|
||||||
/// @endcond
|
/// @endcond
|
||||||
|
|
||||||
// explicit template instantiation
|
// explicit template instantiation
|
||||||
|
|
Loading…
Reference in New Issue
Block a user