- fixed a whole load of PyQT signal problems generated by recent changes to the usage of SpinBoxes; added a signal returnPressed for the FCSpinner and for FCDoubleSpinner
- fixed issue in Paint Tool where the first added tool was expected to have a float diameter but it was a string - updated the translation files to the latest state in the app
This commit is contained in:
@@ -231,9 +231,9 @@ class ToolCalculator(FlatCAMTool):
|
||||
|
||||
# ## Signals
|
||||
self.cutDepth_entry.valueChanged.connect(self.on_calculate_tool_dia)
|
||||
self.cutDepth_entry.editingFinished.connect(self.on_calculate_tool_dia)
|
||||
self.tipDia_entry.editingFinished.connect(self.on_calculate_tool_dia)
|
||||
self.tipAngle_entry.editingFinished.connect(self.on_calculate_tool_dia)
|
||||
self.cutDepth_entry.returnPressed.connect(self.on_calculate_tool_dia)
|
||||
self.tipDia_entry.returnPressed.connect(self.on_calculate_tool_dia)
|
||||
self.tipAngle_entry.returnPressed.connect(self.on_calculate_tool_dia)
|
||||
self.calculate_vshape_button.clicked.connect(self.on_calculate_tool_dia)
|
||||
|
||||
self.mm_entry.editingFinished.connect(self.on_calculate_inch_units)
|
||||
|
||||
@@ -520,7 +520,7 @@ class NonCopperClear(FlatCAMTool, Gerber):
|
||||
# ############################ SGINALS ########################################
|
||||
# #############################################################################
|
||||
self.addtool_btn.clicked.connect(self.on_tool_add)
|
||||
self.addtool_entry.editingFinished.connect(self.on_tool_add)
|
||||
self.addtool_entry.returnPressed.connect(self.on_tool_add)
|
||||
self.deltool_btn.clicked.connect(self.on_tool_delete)
|
||||
self.generate_ncc_button.clicked.connect(self.on_ncc_click)
|
||||
|
||||
|
||||
@@ -417,7 +417,7 @@ class ToolPaint(FlatCAMTool, Gerber):
|
||||
# ################################# Signals ###################################
|
||||
# #############################################################################
|
||||
self.addtool_btn.clicked.connect(self.on_tool_add)
|
||||
self.addtool_entry.editingFinished.connect(self.on_tool_add)
|
||||
self.addtool_entry.returnPressed.connect(self.on_tool_add)
|
||||
# self.copytool_btn.clicked.connect(lambda: self.on_tool_copy())
|
||||
self.tools_table.itemChanged.connect(self.on_tool_edit)
|
||||
self.deltool_btn.clicked.connect(self.on_tool_delete)
|
||||
@@ -574,28 +574,28 @@ class ToolPaint(FlatCAMTool, Gerber):
|
||||
self.default_data.update({
|
||||
"name": '_paint',
|
||||
"plot": self.app.defaults["geometry_plot"],
|
||||
"cutz": self.app.defaults["geometry_cutz"],
|
||||
"cutz": float(self.app.defaults["geometry_cutz"]),
|
||||
"vtipdia": 0.1,
|
||||
"vtipangle": 30,
|
||||
"travelz": self.app.defaults["geometry_travelz"],
|
||||
"feedrate": self.app.defaults["geometry_feedrate"],
|
||||
"feedrate_z": self.app.defaults["geometry_feedrate_z"],
|
||||
"feedrate_rapid": self.app.defaults["geometry_feedrate_rapid"],
|
||||
"travelz": float(self.app.defaults["geometry_travelz"]),
|
||||
"feedrate": float(self.app.defaults["geometry_feedrate"]),
|
||||
"feedrate_z": float(self.app.defaults["geometry_feedrate_z"]),
|
||||
"feedrate_rapid": float(self.app.defaults["geometry_feedrate_rapid"]),
|
||||
"dwell": self.app.defaults["geometry_dwell"],
|
||||
"dwelltime": self.app.defaults["geometry_dwelltime"],
|
||||
"dwelltime": float(self.app.defaults["geometry_dwelltime"]),
|
||||
"multidepth": self.app.defaults["geometry_multidepth"],
|
||||
"ppname_g": self.app.defaults["geometry_ppname_g"],
|
||||
"depthperpass": self.app.defaults["geometry_depthperpass"],
|
||||
"depthperpass": float(self.app.defaults["geometry_depthperpass"]),
|
||||
"extracut": self.app.defaults["geometry_extracut"],
|
||||
"toolchange": self.app.defaults["geometry_toolchange"],
|
||||
"toolchangez": self.app.defaults["geometry_toolchangez"],
|
||||
"endz": self.app.defaults["geometry_endz"],
|
||||
"toolchangez": float(self.app.defaults["geometry_toolchangez"]),
|
||||
"endz": float(self.app.defaults["geometry_endz"]),
|
||||
"spindlespeed": self.app.defaults["geometry_spindlespeed"],
|
||||
"toolchangexy": self.app.defaults["geometry_toolchangexy"],
|
||||
"startz": self.app.defaults["geometry_startz"],
|
||||
|
||||
"tooldia": self.app.defaults["tools_painttooldia"],
|
||||
"paintmargin": self.app.defaults["tools_paintmargin"],
|
||||
"tooldia": float(self.app.defaults["tools_painttooldia"]),
|
||||
"paintmargin": float(self.app.defaults["tools_paintmargin"]),
|
||||
"paintmethod": self.app.defaults["tools_paintmethod"],
|
||||
"selectmethod": self.app.defaults["tools_selectmethod"],
|
||||
"pathconnect": self.app.defaults["tools_pathconnect"],
|
||||
@@ -605,7 +605,7 @@ class ToolPaint(FlatCAMTool, Gerber):
|
||||
|
||||
# call on self.on_tool_add() counts as an call to self.build_ui()
|
||||
# through this, we add a initial row / tool in the tool_table
|
||||
self.on_tool_add(self.app.defaults["tools_painttooldia"], muted=True)
|
||||
self.on_tool_add(float(self.app.defaults["tools_painttooldia"]), muted=True)
|
||||
|
||||
# if the Paint Method is "Single" disable the tool table context menu
|
||||
if self.default_data["selectmethod"] == "single":
|
||||
@@ -715,16 +715,7 @@ class ToolPaint(FlatCAMTool, Gerber):
|
||||
if dia:
|
||||
tool_dia = dia
|
||||
else:
|
||||
try:
|
||||
tool_dia = float(self.addtool_entry.get_value())
|
||||
except ValueError:
|
||||
# try to convert comma to decimal point. if it's still not working error message and return
|
||||
try:
|
||||
tool_dia = float(self.addtool_entry.get_value().replace(',', '.'))
|
||||
except ValueError:
|
||||
self.app.inform.emit('[ERROR_NOTCL] %s' %
|
||||
_("Wrong value format entered, use a number."))
|
||||
return
|
||||
tool_dia = float(self.addtool_entry.get_value())
|
||||
|
||||
if tool_dia is None:
|
||||
self.build_ui()
|
||||
@@ -938,16 +929,7 @@ class ToolPaint(FlatCAMTool, Gerber):
|
||||
# #####################################################
|
||||
self.app.inform.emit(_("Paint Tool. Reading parameters."))
|
||||
|
||||
try:
|
||||
self.overlap = float(self.paintoverlap_entry.get_value())
|
||||
except ValueError:
|
||||
# try to convert comma to decimal point. if it's still not working error message and return
|
||||
try:
|
||||
self.overlap = float(self.paintoverlap_entry.get_value().replace(',', '.'))
|
||||
except ValueError:
|
||||
self.app.inform.emit('[ERROR_NOTCL] %s' %
|
||||
_("Wrong value format entered, use a number."))
|
||||
return
|
||||
self.overlap = float(self.paintoverlap_entry.get_value())
|
||||
|
||||
if self.overlap >= 1 or self.overlap < 0:
|
||||
self.app.inform.emit('[ERROR_NOTCL] %s' %
|
||||
|
||||
@@ -333,13 +333,13 @@ class ToolTransform(FlatCAMTool):
|
||||
self.flipy_button.clicked.connect(self.on_flipy)
|
||||
self.flip_ref_button.clicked.connect(self.on_flip_add_coords)
|
||||
|
||||
self.rotate_entry.editingFinished.connect(self.on_rotate)
|
||||
self.skewx_entry.editingFinished.connect(self.on_skewx)
|
||||
self.skewy_entry.editingFinished.connect(self.on_skewy)
|
||||
self.scalex_entry.editingFinished.connect(self.on_scalex)
|
||||
self.scaley_entry.editingFinished.connect(self.on_scaley)
|
||||
self.offx_entry.editingFinished.connect(self.on_offx)
|
||||
self.offy_entry.editingFinished.connect(self.on_offy)
|
||||
self.rotate_entry.returnPressed.connect(self.on_rotate)
|
||||
self.skewx_entry.returnPressed.connect(self.on_skewx)
|
||||
self.skewy_entry.returnPressed.connect(self.on_skewy)
|
||||
self.scalex_entry.returnPressed.connect(self.on_scalex)
|
||||
self.scaley_entry.returnPressed.connect(self.on_scaley)
|
||||
self.offx_entry.returnPressed.connect(self.on_offx)
|
||||
self.offy_entry.returnPressed.connect(self.on_offy)
|
||||
|
||||
def run(self, toggle=True):
|
||||
self.app.report_usage("ToolTransform()")
|
||||
|
||||
Reference in New Issue
Block a user