- fixed DblSided Tool issue when entering Tool diameter values with comma decimal separator instead of decimal dot separator

- fixed Cutout Tool Freeform to generate cutouts with options: LR, TB. 2LR, 2TB which didn't worked previously
This commit is contained in:
Marius Stanciu
2019-02-16 12:40:44 +02:00
committed by Marius S
parent ffb7931adb
commit b6d36bb86d
3 changed files with 23 additions and 10 deletions

View File

@@ -317,7 +317,18 @@ class DblSidedTool(FlatCAMTool):
xscale, yscale = {"X": (1.0, -1.0), "Y": (-1.0, 1.0)}[axis]
dia = self.drill_dia.get_value()
try:
dia = float(self.drill_dia.get_value())
except ValueError:
# try to convert comma to decimal point. if it's still not working error message and return
try:
dia = float(self.drill_dia.get_value().replace(',', '.'))
self.drill_dia.set_value(dia)
except ValueError:
self.app.inform.emit("[WARNING_NOTCL] Tool diameter value is missing or wrong format. "
"Add it and retry.")
return
if dia is '':
self.app.inform.emit("[WARNING_NOTCL]No value or wrong format in Drill Dia entry. Add it and retry.")
return