Draft: implemented OK button in task dialogs - fixes #2423
This commit is contained in:
parent
287e741210
commit
15a4976c97
|
@ -244,7 +244,9 @@ def dimSymbol(symbol=None,invert=False):
|
||||||
if symbol == None:
|
if symbol == None:
|
||||||
symbol = getParam("dimsymbol",0)
|
symbol = getParam("dimsymbol",0)
|
||||||
from pivy import coin
|
from pivy import coin
|
||||||
if symbol == 1:
|
if symbol == 0:
|
||||||
|
return coin.SoSphere()
|
||||||
|
elif symbol == 1:
|
||||||
marker = coin.SoMarkerSet()
|
marker = coin.SoMarkerSet()
|
||||||
marker.markerIndex = coin.SoMarkerSet.CIRCLE_LINE_9_9
|
marker.markerIndex = coin.SoMarkerSet.CIRCLE_LINE_9_9
|
||||||
return marker
|
return marker
|
||||||
|
|
|
@ -201,8 +201,12 @@ class DraftTaskPanel:
|
||||||
else:
|
else:
|
||||||
self.form = widget
|
self.form = widget
|
||||||
def getStandardButtons(self):
|
def getStandardButtons(self):
|
||||||
return int(QtGui.QDialogButtonBox.Close)
|
return int(QtGui.QDialogButtonBox.Ok) | int(QtGui.QDialogButtonBox.Close)
|
||||||
def accept(self):
|
def accept(self):
|
||||||
|
if hasattr(FreeCADGui,"draftToolBar"):
|
||||||
|
print "validating"
|
||||||
|
FreeCADGui.draftToolBar.validatePoint()
|
||||||
|
else:
|
||||||
FreeCADGui.ActiveDocument.resetEdit()
|
FreeCADGui.ActiveDocument.resetEdit()
|
||||||
return True
|
return True
|
||||||
def reject(self):
|
def reject(self):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user