diff --git a/src/Gui/PythonWorkbenchPy.xml b/src/Gui/PythonWorkbenchPy.xml index 344e467344..08ae38e86f 100644 --- a/src/Gui/PythonWorkbenchPy.xml +++ b/src/Gui/PythonWorkbenchPy.xml @@ -11,7 +11,7 @@ FatherNamespace="Gui"> - This class handles document objects in group + This is the class for Python workbenches @@ -53,11 +53,6 @@ Remove a command bar - - - Reload the active workbench after changing menus or toolbars - - deprecated -- use appendMenu diff --git a/src/Gui/PythonWorkbenchPyImp.cpp b/src/Gui/PythonWorkbenchPyImp.cpp index db609a3895..6a4b5d7a3f 100644 --- a/src/Gui/PythonWorkbenchPyImp.cpp +++ b/src/Gui/PythonWorkbenchPyImp.cpp @@ -24,7 +24,6 @@ #include "PreCompiled.h" #include "Workbench.h" -#include "WorkbenchManager.h" // inclusion of the generated files (generated out of PythonWorkbenchPy.xml) #include "PythonWorkbenchPy.h" @@ -275,20 +274,6 @@ PyObject* PythonWorkbenchPy::removeCommandbar(PyObject *args) } PY_CATCH; } -/** Reload the workbench */ -PyObject* PythonWorkbenchPy::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* PythonWorkbenchPy::getCustomAttributes(const char* ) const { return nullptr; diff --git a/src/Gui/WorkbenchPy.xml b/src/Gui/WorkbenchPy.xml index 457c1d2661..af5b8d9285 100644 --- a/src/Gui/WorkbenchPy.xml +++ b/src/Gui/WorkbenchPy.xml @@ -43,6 +43,11 @@ Show a list of all menus + + + Reload the active workbench after changing menus or toolbars + + diff --git a/src/Gui/WorkbenchPyImp.cpp b/src/Gui/WorkbenchPyImp.cpp index 3982446ed9..9136fced82 100644 --- a/src/Gui/WorkbenchPyImp.cpp +++ b/src/Gui/WorkbenchPyImp.cpp @@ -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;