- some GUI layout optimizations in Edit -> Preferences

- added the possibility for multiple tool diameters in the Edit -> Preferences -> Geometry -> Geometry General -> Tool dia separated by comma
- fixed scaling for the multiple tool diameters in Edit -> Preferences -> Geometry -> Geometry General -> Tool dia, for NCC tools more than 2 and for Solderpaste nozzles more than 2
- fixed bug in CNCJob where the CNC Tools table will show always only 2 decimals for Tool diameters regardless of the current measuring units
- made the tools diameters decimals in case of INCH FlatCAM units to be 4 instead of 3
- fixed bug in updating Grid values whenever toggling the FlatCAM units and the X, Y Grid values are linked, bugs which caused the Y value to be scaled incorrectly
- set the decimals for Grid values to be set to 6 if the units of FlatCAM is INCH and to set to 4 if FlatCAM units are METRIC
- updated translations
- updated the Russian translate from 51% complete to 69% complete using the Yandex translation engine
This commit is contained in:
Marius Stanciu
2019-06-22 17:58:31 +03:00
parent 1132c43f05
commit 68bdfaf062
21 changed files with 3783 additions and 3524 deletions

View File

@@ -1209,7 +1209,7 @@ class FlatCAMExcEditor(QtCore.QObject):
for drill in self.exc_obj.drills:
if drill['tool'] in self.exc_obj.tools:
if self.units == 'IN':
tool_dia = float('%.3f' % self.exc_obj.tools[drill['tool']]['C'])
tool_dia = float('%.4f' % self.exc_obj.tools[drill['tool']]['C'])
else:
tool_dia = float('%.2f' % self.exc_obj.tools[drill['tool']]['C'])
@@ -1238,7 +1238,7 @@ class FlatCAMExcEditor(QtCore.QObject):
# but use the real order found in the exc_obj.tools
for k, v in self.exc_obj.tools.items():
if self.units == 'IN':
tool_dia = float('%.3f' % v['C'])
tool_dia = float('%.4f' % v['C'])
else:
tool_dia = float('%.2f' % v['C'])
self.tool2tooldia[int(k)] = tool_dia
@@ -1324,7 +1324,7 @@ class FlatCAMExcEditor(QtCore.QObject):
if self.units == 'MM':
dia = QtWidgets.QTableWidgetItem('%.2f' % self.olddia_newdia[tool_no])
else:
dia = QtWidgets.QTableWidgetItem('%.3f' % self.olddia_newdia[tool_no])
dia = QtWidgets.QTableWidgetItem('%.4f' % self.olddia_newdia[tool_no])
dia.setFlags(QtCore.Qt.ItemIsEnabled)

View File

@@ -3059,8 +3059,11 @@ class FlatCAMGeoEditor(QtCore.QObject):
val = float(self.app.ui.grid_gap_x_entry.get_value())
except ValueError:
return
units = self.app.ui.general_defaults_form.general_app_group.units_radio.get_value().upper()
dec = 6 if units == 'IN' else 4
if self.app.ui.grid_gap_link_cb.isChecked():
self.app.ui.grid_gap_y_entry.set_value(val)
self.app.ui.grid_gap_y_entry.set_value(val, decimals=dec)
self.app.ui.grid_gap_x_entry.setValidator(QtGui.QDoubleValidator())
self.app.ui.grid_gap_x_entry.textChanged.connect(