Skip to content

Commit

Permalink
Draft: fixed bug introduced by OK button
Browse files Browse the repository at this point in the history
  • Loading branch information
yorikvanhavre committed Feb 1, 2016
1 parent 04e9392 commit fc9fe3e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Mod/Draft/DraftGui.py
Expand Up @@ -204,8 +204,7 @@ def getStandardButtons(self):
return int(QtGui.QDialogButtonBox.Ok) | int(QtGui.QDialogButtonBox.Close)
def accept(self):
if hasattr(FreeCADGui,"draftToolBar"):
FreeCADGui.draftToolBar.validatePoint()
return True
return FreeCADGui.draftToolBar.validatePoint()
else:
FreeCADGui.ActiveDocument.resetEdit()
return True
Expand Down Expand Up @@ -1223,8 +1222,11 @@ def validatePoint(self):
numy = last.y + v.y
numz = last.z + v.z
self.sourceCmd.numericInput(numx,numy,numz)
elif (self.textValue.isVisible() or self.SStringValue.isVisible() or self.SSizeValue.isVisible() or self.STrackValue.isVisible() or self.FFileValue.isVisible()):
return False
else:
FreeCADGui.ActiveDocument.resetEdit()
return True

def validateSNumeric(self):
''' send valid numeric parameters to ShapeString '''
Expand Down

0 comments on commit fc9fe3e

Please sign in to comment.