Draft: new utility toolbar with some useful commands
These commands are useful but are "hiden" inside the "Utilities" menu, so not many poeple know about them. By placing them in a toolbar, they will be more discoverable.
This commit is contained in:
@@ -102,11 +102,13 @@ class DraftWorkbench(FreeCADGui.Workbench):
|
||||
self.context_commands = it.get_draft_context_commands()
|
||||
self.line_commands = it.get_draft_line_commands()
|
||||
self.utility_commands = it.get_draft_utility_commands()
|
||||
self.utility_small = it.get_draft_small_commands()
|
||||
|
||||
# Set up toolbars
|
||||
self.appendToolbar(QT_TRANSLATE_NOOP("Draft", "Draft creation tools"), self.drawing_commands)
|
||||
self.appendToolbar(QT_TRANSLATE_NOOP("Draft", "Draft annotation tools"), self.annotation_commands)
|
||||
self.appendToolbar(QT_TRANSLATE_NOOP("Draft", "Draft modification tools"), self.modification_commands)
|
||||
self.appendToolbar(QT_TRANSLATE_NOOP("Draft", "Draft utility tools"), self.utility_small)
|
||||
|
||||
# Set up menus
|
||||
self.appendMenu(QT_TRANSLATE_NOOP("Draft", "&Drafting"), self.drawing_commands)
|
||||
|
||||
@@ -57,6 +57,13 @@ def get_draft_array_commands():
|
||||
return ["Draft_ArrayTools"]
|
||||
|
||||
|
||||
def get_draft_small_commands():
|
||||
"""Return a list with only some utilities."""
|
||||
return ["Draft_Layer",
|
||||
"Draft_WorkingPlaneProxy",
|
||||
"Draft_ToggleDisplayMode"]
|
||||
|
||||
|
||||
def get_draft_modification_commands():
|
||||
"""Return the modification commands list."""
|
||||
lst = ["Draft_Move", "Draft_Rotate",
|
||||
@@ -74,8 +81,7 @@ def get_draft_modification_commands():
|
||||
"Separator",
|
||||
"Draft_WireToBSpline", "Draft_Draft2Sketch",
|
||||
"Separator",
|
||||
"Draft_Shape2DView", "Draft_Drawing",
|
||||
"Draft_WorkingPlaneProxy"]
|
||||
"Draft_Shape2DView", "Draft_Drawing"]
|
||||
return lst
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user