Gui: move reloadActive() to WorkbenchPy base class

This commit is contained in:
wmayer
2022-02-18 07:51:47 +01:00
parent fdc4196384
commit fe2719014b
4 changed files with 20 additions and 21 deletions

View File

@@ -145,6 +145,20 @@ PyObject* WorkbenchPy::listCommandbars(PyObject *args)
} PY_CATCH;
}
/** Reload the workbench */
PyObject* WorkbenchPy::reloadActive(PyObject *args)
{
PY_TRY {
if (!PyArg_ParseTuple(args, ""))
return nullptr;
Workbench* active = Gui::WorkbenchManager::instance()->active();
if (active)
active->activate();
Py_Return;
} PY_CATCH;
}
PyObject* WorkbenchPy::getCustomAttributes(const char*) const
{
return nullptr;