[Spreadsheet] Expose SpreadsheetView::getSheet to Python

This commit is contained in:
0penBrain
2020-07-31 18:42:18 +02:00
parent 555c2e5a0d
commit 07db7dd262
4 changed files with 69 additions and 1 deletions

View File

@@ -52,6 +52,7 @@
#include "qtcolorpicker.h"
#include "SpreadsheetView.h"
#include "SpreadsheetViewPy.h"
#include "SpreadsheetDelegate.h"
#include "ui_Sheet.h"
@@ -444,7 +445,11 @@ QModelIndex SheetView::currentIndex() const
PyObject *SheetView::getPyObject()
{
return Gui::MDIView::getPyObject();
if (!pythonObject)
pythonObject = new SpreadsheetViewPy(this);
Py_INCREF(pythonObject);
return pythonObject;
}
void SheetView::deleteSelf()