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:
|
||||
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
|
||||
|
@ -272,7 +274,7 @@ def dimSymbol(symbol=None,invert=False):
|
|||
return marker
|
||||
else:
|
||||
print("Draft.dimsymbol: Not implemented")
|
||||
return coin.SoSphere()
|
||||
return coin.SoSphere()
|
||||
|
||||
def shapify(obj):
|
||||
'''shapify(object): transforms a parametric shape object into
|
||||
|
|
|
@ -201,10 +201,14 @@ 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):
|
||||
FreeCADGui.ActiveDocument.resetEdit()
|
||||
return True
|
||||
if hasattr(FreeCADGui,"draftToolBar"):
|
||||
print "validating"
|
||||
FreeCADGui.draftToolBar.validatePoint()
|
||||
else:
|
||||
FreeCADGui.ActiveDocument.resetEdit()
|
||||
return True
|
||||
def reject(self):
|
||||
FreeCADGui.draftToolBar.isTaskOn = False
|
||||
FreeCADGui.draftToolBar.escape()
|
||||
|
|
Loading…
Reference in New Issue
Block a user