Files
create/src/Mod/Draft/draftutils
Roy-043 83a5eaeef4 Draft: avoid listing status bar widgets in toolbar area context menu
Fixes #16832.

In V1.0 the two Draft status bar widgets appear as checkboxes without label in the toolbar area context menu. They should not be listed in that menu, as was the case in V0.21. Their visibility is controlled via preferences.

Additionally, in case the Draft WB is only preloaded, the widgets would display in another workbench. This is prevented by using a delay.
2024-11-25 11:40:55 +01:00
..
2024-01-25 14:27:38 +01:00
2021-09-30 23:38:54 +02:00

2020 May

These files provide auxiliary functions used by the Draft workbench.

Previously most of these functions were defined in Draft.py, DraftTools.py, and DraftGui.py. However, due to being defined in these big modules, it was impossible to use them individually without importing the entire modules. So a decision was made to split the functions into smaller modules.

In here we want modules with generic functions that can be used everywhere in the workbench. We want these tools to depend only on standard Python modules and basic FreeCAD methods so that there are no circular dependencies, and so that they can be used by all functions and graphical commands in this workbench, and others if possible.

  • utils: basic functions
  • messages: used to print messages
  • translate: used to translate texts
  • init_tools: used to initialize the workbench (toolbars and menus)
  • todo: used to delay execution of certain graphical commands

Some auxiliary functions require that the graphical interface is loaded as they deal with scripted objects' view providers or the 3D view.

  • gui_utils: basic functions dealing with the graphical interface
  • init_draft_statusbar: functions to initialize the status bar

For more information see the thread: [Discussion] Splitting Draft tools into their own modules