Draft: implemented OK button in task dialogs - fixes #2423

This commit is contained in:
Yorik van Havre 2016-01-30 15:07:29 -02:00
parent 287e741210
commit 15a4976c97
2 changed files with 11 additions and 5 deletions

View File

@ -244,7 +244,9 @@ def dimSymbol(symbol=None,invert=False):
if symbol == None:
symbol = getParam("dimsymbol",0)
from pivy import coin
if symbol == 1:
if symbol == 0:
return coin.SoSphere()
elif symbol == 1:
marker = coin.SoMarkerSet()
marker.markerIndex = coin.SoMarkerSet.CIRCLE_LINE_9_9
return marker

View File

@ -201,8 +201,12 @@ class DraftTaskPanel:
else:
self.form = widget
def getStandardButtons(self):
return int(QtGui.QDialogButtonBox.Close)
return int(QtGui.QDialogButtonBox.Ok) | int(QtGui.QDialogButtonBox.Close)
def accept(self):
if hasattr(FreeCADGui,"draftToolBar"):
print "validating"
FreeCADGui.draftToolBar.validatePoint()
else:
FreeCADGui.ActiveDocument.resetEdit()
return True
def reject(self):