Issue #284 - Sanitize the entered Overlap value for the Copper Clear Tool as well.

Change the "Overlap:" label occurrences to "Overlap Rate:" for clarity.
This commit is contained in:
Victor Benso 2019-04-03 12:41:25 -04:00
parent ece1538239
commit 1f67158e35
3 changed files with 9 additions and 4 deletions

View File

@ -437,7 +437,7 @@ class PaintOptionsTool(FlatCAMTool):
grid.addWidget(self.painttooldia_entry, 0, 1)
# Overlap
ovlabel = QtWidgets.QLabel(_('Overlap:'))
ovlabel = QtWidgets.QLabel(_('Overlap Rate:'))
ovlabel.setToolTip(
_("How much (fraction) of the tool width to overlap each tool pass.\n"
"Example:\n"

View File

@ -4865,7 +4865,7 @@ class ToolsNCCPrefGroupUI(OptionsGroupUI):
self.ncc_tool_dia_entry = FCEntry()
grid0.addWidget(self.ncc_tool_dia_entry, 0, 1)
nccoverlabel = QtWidgets.QLabel(_('Overlap:'))
nccoverlabel = QtWidgets.QLabel(_('Overlap Rate:'))
nccoverlabel.setToolTip(
_( "How much (fraction) of the tool width to overlap each tool pass.\n"
"Example:\n"
@ -5110,7 +5110,7 @@ class ToolsPaintPrefGroupUI(OptionsGroupUI):
grid0.addWidget(self.painttooldia_entry, 0, 1)
# Overlap
ovlabel = QtWidgets.QLabel(_('Overlap:'))
ovlabel = QtWidgets.QLabel(_('Overlap Rate:'))
ovlabel.setToolTip(
_("How much (fraction) of the tool\n"
"width to overlap each tool pass.")

View File

@ -162,7 +162,7 @@ class NonCopperClear(FlatCAMTool, Gerber):
e_lab_1 = QtWidgets.QLabel('')
grid3.addWidget(e_lab_1, 0, 0)
nccoverlabel = QtWidgets.QLabel(_('Overlap:'))
nccoverlabel = QtWidgets.QLabel(_('Overlap Rate:'))
nccoverlabel.setToolTip(
_("How much (fraction) of the tool width to overlap each tool pass.\n"
"Example:\n"
@ -628,6 +628,11 @@ class NonCopperClear(FlatCAMTool, Gerber):
return
over = over if over else self.app.defaults["tools_nccoverlap"]
if over >= 1 or over < 0:
self.app.inform.emit(_("[ERROR_NOTCL] Overlap value must be between "
"0 (inclusive) and 1 (exclusive), "))
return
try:
margin = float(self.ncc_margin_entry.get_value())
except ValueError: