Gui: Fix regression in SelectionObserverPython::removeObserver.
This commit is contained in:
@@ -34,8 +34,6 @@ std::vector<SelectionObserverPython*> SelectionObserverPython::_instances;
|
||||
|
||||
void SelectionObserverPythonHandler::init(PyObject* obj)
|
||||
{
|
||||
this->inst = obj;
|
||||
|
||||
#undef FC_PY_ELEMENT
|
||||
#define FC_PY_ELEMENT(_name) FC_PY_GetCallable(obj,#_name,py_##_name);
|
||||
FC_PY_SEL_OBSERVER
|
||||
@@ -209,7 +207,7 @@ void SelectionObserverPythonHandler::removePreselection(const SelectionChanges&
|
||||
|
||||
|
||||
SelectionObserverPython::SelectionObserverPython(const Py::Object& obj, ResolveMode resolve)
|
||||
: SelectionObserver(true, resolve)
|
||||
: SelectionObserver(true, resolve), inst(obj)
|
||||
{
|
||||
this->init(obj.ptr());
|
||||
}
|
||||
|
||||
@@ -52,8 +52,6 @@ protected:
|
||||
|
||||
private:
|
||||
|
||||
PyObject* inst{nullptr};
|
||||
|
||||
#define FC_PY_SEL_OBSERVER \
|
||||
FC_PY_ELEMENT(onSelectionChanged) \
|
||||
FC_PY_ELEMENT(addSelection) \
|
||||
|
||||
Reference in New Issue
Block a user