fix(gui): forward optional visibility arg in Workbench.appendToolbar() #182
Reference in New Issue
Block a user
Delete Branch "fix/appendToolbar-visibility"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The Python wrapper class
WorkbenchinFreeCADGuiInit.pyonly accepted(name, cmds)in itsappendToolbar()method, but the underlying C++PythonWorkbench::appendToolbaraccepts an optional third visibility string (PyArg_ParseTuple(args, "sO|s", ...)).When workbenches passed a visibility argument like
"Unavailable", the Python wrapper raised:Changes
visibilityparameter toWorkbench.appendToolbar()insrc/Gui/FreeCADGuiInit.pyTesting
The Silo workbench
InitGui.pycallsself.appendToolbar("Silo Origin", cmds, "Unavailable")— this no longer raises an error.