0000901: Draft Edit mode
This commit is contained in:
@@ -1796,7 +1796,8 @@ class _ViewProviderDraft:
|
||||
def unsetEdit(self,vp,mode):
|
||||
if FreeCAD.activeDraftCommand:
|
||||
FreeCAD.activeDraftCommand.finish()
|
||||
return
|
||||
FreeCADGui.Control.closeDialog()
|
||||
return False
|
||||
|
||||
def getIcon(self):
|
||||
return(":/icons/Draft_Draft.svg")
|
||||
|
||||
@@ -908,6 +908,7 @@ class DraftToolBar:
|
||||
if self.cancel:
|
||||
self.cancel()
|
||||
self.cancel = None
|
||||
FreeCADGui.ActiveDocument.resetEdit()
|
||||
|
||||
def escape(self):
|
||||
"escapes the current command"
|
||||
@@ -919,6 +920,7 @@ class DraftToolBar:
|
||||
def closeLine(self):
|
||||
"close button action"
|
||||
self.sourceCmd.finish(True)
|
||||
FreeCADGui.ActiveDocument.resetEdit()
|
||||
|
||||
def wipeLine(self):
|
||||
"wipes existing segments of a line"
|
||||
|
||||
@@ -3114,12 +3114,17 @@ class Edit(Modifier):
|
||||
Modifier.finish(self)
|
||||
plane.restore()
|
||||
self.running = False
|
||||
FreeCADGui.ActiveDocument.resetEdit()
|
||||
|
||||
def action(self,arg):
|
||||
"scene event handler"
|
||||
if arg["Type"] == "SoKeyboardEvent":
|
||||
if arg["Key"] == "ESCAPE":
|
||||
self.finish()
|
||||
elif arg["Key"] == "f":
|
||||
self.finish()
|
||||
elif arg["Key"] == "c":
|
||||
self.finish(closed=True)
|
||||
elif arg["Type"] == "SoLocation2Event": #mouse movement detection
|
||||
if self.editing != None:
|
||||
self.point,ctrlPoint,info = getPoint(self,arg)
|
||||
|
||||
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.4 KiB |
Reference in New Issue
Block a user