Skip to content

Commit

Permalink
Draft: DraftGui, use boolean values to set up an option instead of nu…
Browse files Browse the repository at this point in the history
…meric values 1 and 0
  • Loading branch information
vocx-fc authored and yorikvanhavre committed Oct 14, 2019
1 parent a9bf9ba commit 1b044e9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Mod/Draft/DraftGui.py
Expand Up @@ -2459,7 +2459,7 @@ def __init__(self):

self.stringText = translate("draft","Default")
self.task.leString.setText(self.stringText)
self.platWinDialog(1)
self.platWinDialog(True)
self.task.fcFontFile.setFileName(Draft.getParam("FontFile",""))
self.fileSpec = Draft.getParam("FontFile","")
self.point = FreeCAD.Vector(0.0,0.0,0.0)
Expand Down Expand Up @@ -2534,7 +2534,7 @@ def createObject(self):
def platWinDialog(self, OnOff):
tDialog = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Dialog")
if platform.system() == 'Windows':
if OnOff == 1:
if OnOff:
return tDialog.SetBool("DontUseNativeDialog", True)
else:
return tDialog.SetBool("DontUseNativeDialog", False)
Expand All @@ -2545,15 +2545,15 @@ def accept(self):
FreeCADGui.ActiveDocument.resetEdit()
FreeCADGui.Snapper.off()
self.sourceCmd.creator.finish(self.sourceCmd)
self.platWinDialog(0)
self.platWinDialog(False)
return True

def reject(self):
if self.call: self.view.removeEventCallback("SoEvent",self.call)
FreeCADGui.ActiveDocument.resetEdit()
FreeCADGui.Snapper.off()
self.sourceCmd.creator.finish(self.sourceCmd)
self.platWinDialog(0)
self.platWinDialog(False)
return True

if not hasattr(FreeCADGui,"draftToolBar"):
Expand Down

0 comments on commit 1b044e9

Please sign in to comment.