- added protection against entering float numbers with comma separator instead of decimal dot separator in key points of FlatCAM (not everywhere)

- added a choice of plotting the kind of geometry for the CNC plot (all, travel and cut kind of geometries) in CNCJob Selected Tab
This commit is contained in:
Marius Stanciu
2019-02-02 23:56:08 +02:00
committed by Marius S
parent 0b96cbbac1
commit 7607aad8d8
15 changed files with 571 additions and 129 deletions

View File

@@ -1,6 +1,6 @@
from FlatCAMTool import FlatCAMTool
from GUIElements import RadioSet, FloatEntry
from GUIElements import RadioSet, FCEntry
from PyQt5 import QtGui, QtCore, QtWidgets
@@ -99,7 +99,7 @@ class Film(FlatCAMTool):
# Boundary for negative film generation
self.boundary_entry = FloatEntry()
self.boundary_entry = FCEntry()
self.boundary_label = QtWidgets.QLabel("Border:")
self.boundary_label.setToolTip(
"Specify a border around the object.\n"
@@ -172,7 +172,17 @@ class Film(FlatCAMTool):
self.app.inform.emit("[error_notcl] No Box object selected. Load a Box object and retry.")
return
border = float(self.boundary_entry.get_value())
try:
border = float(self.boundary_entry.get_value())
except ValueError:
# try to convert comma to decimal point. if it's still not working error message and return
try:
border = float(self.boundary_entry.get_value().replace(',', '.'))
except ValueError:
self.app.inform.emit("[error_notcl]Wrong value format entered, "
"use a number.")
return
if border is None:
border = 0