[Draft] Remove AddPoint and DelPoint commands from UI

[Draft] Edit: Remove Bezcurve interface from Edit Ui


[Draft] Edit: cleanup


small improvement to tooltip
This commit is contained in:
carlopav
2020-02-12 23:05:12 +01:00
committed by Yorik van Havre
parent e79c1e6c99
commit 8fd55eb6ff
2 changed files with 9 additions and 19 deletions

View File

@@ -253,15 +253,18 @@ class Edit():
"Part", "Part::Line", "Part::Box"]
def GetResources(self):
tooltip = ("Edits the active object.\n"
"Press E or ALT+LeftClick to display context menu\n"
"on supported nodes and on supported objects.")
return {'Pixmap': 'Draft_Edit',
'Accel': "D, E",
'MenuText': QtCore.QT_TRANSLATE_NOOP("Draft_Edit", "Edit"),
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Draft_Edit",
"Edits the active object.\n"
"Press E or ALT+LeftClick to display context menu\n"
"on supported nodes and on supported objects.")
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Draft_Edit", tooltip)
}
#---------------------------------------------------------------------------
# MAIN FUNCTIONS
#---------------------------------------------------------------------------
@@ -443,18 +446,6 @@ class Edit():
event.getButton() == event.BUTTON1
):#left click
if not event.wasAltDown():
if Draft.getType(self.obj) == "BezCurve" and (self.ui.sharpButton.isChecked()
or self.ui.tangentButton.isChecked() or
self.ui.symmetricButton.isChecked()):
pos = event.getPosition()
node = self.getEditNode(pos)
ep = self.getEditNodeIndex(node)
if ep is None:
return
doc = App.getDocument(str(node.documentName.getValue()))
self.obj = doc.getObject(str(node.objectName.getValue()))
if self.obj is None:
return
if self.editing is None:
self.startEditing(event)
else:

View File

@@ -63,9 +63,8 @@ def get_draft_modification_commands():
"Draft_Trimex", "Draft_Join", "Draft_Split",
"Draft_Upgrade", "Draft_Downgrade", "Draft_Scale",
"Draft_Edit", "Draft_SubelementHighlight",
"Draft_WireToBSpline", "Draft_AddPoint",
"Draft_DelPoint", "Draft_Shape2DView",
"Draft_Draft2Sketch"]
"Draft_WireToBSpline", "Draft_Draft2Sketch",
"Draft_Shape2DView"]
lst += get_draft_array_commands()
lst += ["Draft_Clone",
"Draft_Drawing", "Draft_Mirror", "Draft_Stretch"]