Draft: move ShapeString to the creation tools
Previously it was placed in the `annotation` category but since it creates a group of shapes, it is better in the `creation` category. Also small fixes in the menu text and tooltip.
This commit is contained in:
@@ -2237,14 +2237,22 @@ class Dimension(Creator):
|
||||
if not self.cont:
|
||||
self.finish()
|
||||
|
||||
|
||||
class ShapeString(Creator):
|
||||
"""This class creates a shapestring feature."""
|
||||
"""The Draft_ShapeString FreeCAD command definition."""
|
||||
|
||||
def GetResources(self):
|
||||
return {'Pixmap' : 'Draft_ShapeString',
|
||||
'Accel' : "S, S",
|
||||
'MenuText': QtCore.QT_TRANSLATE_NOOP("Draft_ShapeString", "Shape from text..."),
|
||||
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Draft_ShapeString", "Creates text string in shapes.")}
|
||||
"""Set icon, menu and tooltip."""
|
||||
_menu = "Shape from text"
|
||||
_tooltip = ("Creates a shape from a text string by choosing "
|
||||
"a specific font and a placement.\n"
|
||||
"The closed shapes can be used for extrusions "
|
||||
"and boolean operations.")
|
||||
d = {'Pixmap': 'Draft_ShapeString',
|
||||
'Accel': "S, S",
|
||||
'MenuText': QtCore.QT_TRANSLATE_NOOP("Draft_ShapeString", _menu),
|
||||
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Draft_ShapeString", _tooltip)}
|
||||
return d
|
||||
|
||||
def Activated(self):
|
||||
name = translate("draft","ShapeString")
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
"""Initialization of the Draft workbench (graphical interface)."""
|
||||
# ***************************************************************************
|
||||
# * Copyright (c) 2009 Yorik van Havre <yorik@uncreated.net> *
|
||||
# * *
|
||||
@@ -19,7 +18,10 @@
|
||||
# * USA *
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
"""Initialization of the Draft workbench (graphical interface)."""
|
||||
|
||||
import os
|
||||
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
|
||||
@@ -42,12 +42,13 @@ def get_draft_drawing_commands():
|
||||
"Draft_ArcTools",
|
||||
"Draft_Circle", "Draft_Ellipse", "Draft_Rectangle",
|
||||
"Draft_Polygon", "Draft_BSpline", "Draft_BezierTools",
|
||||
"Draft_Point", "Draft_Facebinder"]
|
||||
"Draft_Point", "Draft_Facebinder",
|
||||
"Draft_ShapeString"]
|
||||
|
||||
|
||||
def get_draft_annotation_commands():
|
||||
"""Return the annotation commands list."""
|
||||
return ["Draft_Text", "Draft_ShapeString", "Draft_Dimension",
|
||||
return ["Draft_Text", "Draft_Dimension",
|
||||
"Draft_Label"]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user