0000901: Draft Edit mode

This commit is contained in:
Yorik van Havre
2012-12-18 14:44:39 -02:00
parent c6f7c1d9ce
commit b0c93f2737
4 changed files with 18 additions and 11 deletions

View File

@@ -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")

View File

@@ -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"

View File

@@ -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