From 1d83fa7d9225dabc122f933b02c1e77348367b07 Mon Sep 17 00:00:00 2001 From: vocx-fc Date: Tue, 8 Oct 2019 00:51:35 -0500 Subject: [PATCH] Draft: renamed the command Draft_Edit_Improved to Draft_SubelementModify because the previous name was confusing; also provide a new icon --- src/Mod/Draft/DraftTools.py | 19 +- src/Mod/Draft/InitGui.py | 2 +- src/Mod/Draft/Resources/Draft.qrc | 1 + .../icons/Draft_SubelementModify.svg | 859 ++++++++++++++++++ 4 files changed, 872 insertions(+), 9 deletions(-) create mode 100644 src/Mod/Draft/Resources/icons/Draft_SubelementModify.svg diff --git a/src/Mod/Draft/DraftTools.py b/src/Mod/Draft/DraftTools.py index 4737632125..2eb8c61585 100644 --- a/src/Mod/Draft/DraftTools.py +++ b/src/Mod/Draft/DraftTools.py @@ -2366,7 +2366,8 @@ class Move(Modifier): def Activated(self): self.name = translate("draft","Move", utf8_decode=True) - Modifier.Activated(self, self.name, is_subtool=isinstance(FreeCAD.activeDraftCommand, EditImproved)) + Modifier.Activated(self, self.name, + is_subtool=isinstance(FreeCAD.activeDraftCommand, SubelementModify)) if not self.ui: return self.ghosts = [] @@ -4269,8 +4270,8 @@ class ToggleDisplayMode(): if "Flat Lines" in obj.ViewObject.listDisplayModes(): obj.ViewObject.DisplayMode = "Flat Lines" -class EditImproved(Modifier): - """The Draft_Edit_Improved FreeCAD command definition""" +class SubelementModify(Modifier): + """The Draft_SubelementModify FreeCAD command definition""" def __init__(self): self.is_running = False @@ -4278,16 +4279,18 @@ class EditImproved(Modifier): self.original_view_settings = {} def GetResources(self): - return {'Pixmap' : 'Draft_Edit', + return {'Pixmap' : 'Draft_SubelementModify', 'Accel' : "D, E", - 'MenuText': QtCore.QT_TRANSLATE_NOOP("Draft_Edit_Improved", "Edit Improved"), - 'ToolTip': QtCore.QT_TRANSLATE_NOOP("Draft_Edit_Improved", "Edits the selected objects")} + 'MenuText': QtCore.QT_TRANSLATE_NOOP("Draft_SubelementModify", "Subelement modify"), + 'ToolTip': QtCore.QT_TRANSLATE_NOOP("Draft_SubelementModify", + "Allows editing the subelements " + "of the selected objects with other modification tools")} def Activated(self): if self.is_running: return self.finish() self.is_running = True - Modifier.Activated(self,"Edit_Improved") + Modifier.Activated(self, "SubelementModify") self.get_selection() def proceed(self): @@ -5680,7 +5683,7 @@ FreeCADGui.addCommand('Draft_Downgrade',Downgrade()) FreeCADGui.addCommand('Draft_Trimex',Trimex()) FreeCADGui.addCommand('Draft_Scale',Scale()) FreeCADGui.addCommand('Draft_Drawing',Drawing()) -FreeCADGui.addCommand('Draft_Edit_Improved',EditImproved()) +FreeCADGui.addCommand('Draft_SubelementModify', SubelementModify()) FreeCADGui.addCommand('Draft_AddPoint',AddPoint()) FreeCADGui.addCommand('Draft_DelPoint',DelPoint()) FreeCADGui.addCommand('Draft_WireToBSpline',WireToBSpline()) diff --git a/src/Mod/Draft/InitGui.py b/src/Mod/Draft/InitGui.py index 990ad5a7ae..cd6931dc20 100644 --- a/src/Mod/Draft/InitGui.py +++ b/src/Mod/Draft/InitGui.py @@ -82,7 +82,7 @@ class DraftWorkbench(Workbench): self.modList = ["Draft_Move", "Draft_Rotate", "Draft_Offset", "Draft_Trimex", "Draft_Join", "Draft_Split", "Draft_Upgrade", "Draft_Downgrade", "Draft_Scale", - "Draft_Edit", "Draft_Edit_Improved", + "Draft_Edit", "Draft_SubelementModify", "Draft_WireToBSpline", "Draft_AddPoint", "Draft_DelPoint", "Draft_Shape2DView", "Draft_Draft2Sketch", "Draft_Array", "Draft_LinkArray", diff --git a/src/Mod/Draft/Resources/Draft.qrc b/src/Mod/Draft/Resources/Draft.qrc index 570e74b9bb..a14e6b1ab8 100644 --- a/src/Mod/Draft/Resources/Draft.qrc +++ b/src/Mod/Draft/Resources/Draft.qrc @@ -62,6 +62,7 @@ icons/Draft_Snap.svg icons/Draft_Split.svg icons/Draft_Stretch.svg + icons/Draft_SubelementModify.svg icons/Draft_SwitchMode.svg icons/Draft_Text.svg icons/Draft_Trimex.svg diff --git a/src/Mod/Draft/Resources/icons/Draft_SubelementModify.svg b/src/Mod/Draft/Resources/icons/Draft_SubelementModify.svg new file mode 100644 index 0000000000..edf5524e1b --- /dev/null +++ b/src/Mod/Draft/Resources/icons/Draft_SubelementModify.svg @@ -0,0 +1,859 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + Draft_Edit + + Mon Oct 10 13:44:52 2011 +0000 + + + [wmayer] + + + + + FreeCAD LGPL2+ + + + + + FreeCAD + + + FreeCAD/src/Mod/Draft/Resources/icons/Draft_Edit.svg + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + [agryson] Alexander Gryson + + + + + polygon + pencil + edit + + + Irregular polygon behind a pencil + + + +