Draft: fix syntax errors

This commit is contained in:
wmayer
2021-02-13 12:14:12 +01:00
parent 5086c5f38d
commit 2b881cccad
9 changed files with 12 additions and 9 deletions

View File

@@ -68,7 +68,7 @@ class Arc(gui_base_original.Creator):
def Activated(self):
"""Execute when the command is called."""
super(Arc, self).Activated(name=translate("draft","Arc")
super(Arc, self).Activated(name=translate("draft","Arc"))
if self.ui:
self.step = 0
self.center = None

View File

@@ -235,7 +235,7 @@ class CubicBezCurve(gui_lines.Line):
def GetResources(self):
"""Set icon, menu and tooltip."""
_menu =
_menu = ""
_tip = ()
return {'Pixmap': 'Draft_CubicBezCurve',

View File

@@ -163,7 +163,10 @@ class SelectGroup(gui_base.GuiCommandNeedsSelection):
d = {'Pixmap': 'Draft_SelectGroup',
'MenuText': QT_TRANSLATE_NOOP("Draft_SelectGroup","Select group"),
'ToolTip': QT_TRANSLATE_NOOP("Draft_SelectGroup","If the selection is a group, it selects all objects that are inside this group, including those in nested sub-groups.\n\nIf the selection is a simple object inside a group, it will select the "brother" objects, that is,\nthose that are at the same level as this object, including the upper group that contains them all.")}
'ToolTip': QT_TRANSLATE_NOOP("Draft_SelectGroup","If the selection is a group, it selects all objects that are inside this group, "
"including those in nested sub-groups.\n\nIf the selection is a simple object "
"inside a group, it will select the \"brother\" objects, that is,\nthose that are "
"at the same level as this object, including the upper group that contains them all.")}
return d
def Activated(self):

View File

@@ -54,7 +54,7 @@ class Shape2DView(gui_base_original.Modifier):
def GetResources(self):
"""Set icon, menu and tooltip."""
_menu =
_menu = ""
_tip = ()
return {'Pixmap': 'Draft_2DShapeView',

View File

@@ -62,7 +62,7 @@ class ShapeString(gui_base_original.Creator):
def GetResources(self):
"""Set icon, menu and tooltip."""
_menu =
_menu = ""
_tip = ()
d = {'Pixmap': 'Draft_ShapeString',

View File

@@ -567,7 +567,7 @@ class ShowSnapBar(gui_base.GuiCommandSimplest):
def GetResources(self):
"""Set icon, menu and tooltip."""
_tip =
_tip = ""
return {'Pixmap': 'Draft_Snap',
'MenuText': QT_TRANSLATE_NOOP("Draft_ShowSnapBar","Show snap toolbar"),

View File

@@ -54,7 +54,7 @@ class SubelementHighlight(gui_base_original.Modifier):
def GetResources(self):
"""Set icon, menu and tooltip."""
_menu =
_menu = ""
_tip = ()
return {'Pixmap': 'Draft_SubelementHighlight',

View File

@@ -297,7 +297,7 @@ class TaskPanelCircularArray:
"App.ActiveDocument.recompute()"]
# We commit the command list through the parent command
self.source_command.commit(translate("draft","Circular array", _cmd_list)
self.source_command.commit(translate("draft","Circular array", _cmd_list))
def get_distances(self):
"""Get the distance parameters from the widgets."""

View File

@@ -92,7 +92,7 @@ class TaskPanelPolarArray:
pix = QtGui.QPixmap(svg)
icon = QtGui.QIcon.fromTheme(icon_name, QtGui.QIcon(svg))
self.form.setWindowIcon(icon)
self.form.setWindowTitle(translate("draft","Polar array")
self.form.setWindowTitle(translate("draft","Polar array"))
self.form.label_icon.setPixmap(pix.scaled(32, 32))