- in Preferences General, Gerber, Geometry, Excellon, CNCJob sections made all the input fields of type SpinBox (where possible)
- updated the Distance Tool utility geometry color to adapt to the dark theme canvas
This commit is contained in:
@@ -4256,7 +4256,7 @@ class FlatCAMGeoEditor(QtCore.QObject):
|
||||
# # ## Grid snap
|
||||
if self.options["grid_snap"]:
|
||||
if self.options["global_gridx"] != 0:
|
||||
snap_x_ = round(x / self.options["global_gridx"]) * self.options['global_gridx']
|
||||
snap_x_ = round(x / float(self.options["global_gridx"])) * float(self.options['global_gridx'])
|
||||
else:
|
||||
snap_x_ = x
|
||||
|
||||
@@ -4264,12 +4264,12 @@ class FlatCAMGeoEditor(QtCore.QObject):
|
||||
# and it will use the snap distance from GridX entry
|
||||
if self.app.ui.grid_gap_link_cb.isChecked():
|
||||
if self.options["global_gridx"] != 0:
|
||||
snap_y_ = round(y / self.options["global_gridx"]) * self.options['global_gridx']
|
||||
snap_y_ = round(y / float(self.options["global_gridx"])) * float(self.options['global_gridx'])
|
||||
else:
|
||||
snap_y_ = y
|
||||
else:
|
||||
if self.options["global_gridy"] != 0:
|
||||
snap_y_ = round(y / self.options["global_gridy"]) * self.options['global_gridy']
|
||||
snap_y_ = round(y / float(self.options["global_gridy"])) * float(self.options['global_gridy'])
|
||||
else:
|
||||
snap_y_ = y
|
||||
nearest_grid_distance = distance((x, y), (snap_x_, snap_y_))
|
||||
|
||||
@@ -3042,14 +3042,14 @@ class FlatCAMGrbEditor(QtCore.QObject):
|
||||
self.aptype_cb.set_value(self.app.defaults["gerber_editor_newtype"])
|
||||
self.apdim_entry.set_value(self.app.defaults["gerber_editor_newdim"])
|
||||
|
||||
self.pad_array_size_entry.set_value(self.app.defaults["gerber_editor_array_size"])
|
||||
self.pad_array_size_entry.set_value(int(self.app.defaults["gerber_editor_array_size"]))
|
||||
# linear array
|
||||
self.pad_axis_radio.set_value(self.app.defaults["gerber_editor_lin_axis"])
|
||||
self.pad_pitch_entry.set_value(self.app.defaults["gerber_editor_lin_pitch"])
|
||||
self.pad_pitch_entry.set_value(float(self.app.defaults["gerber_editor_lin_pitch"]))
|
||||
self.linear_angle_spinner.set_value(self.app.defaults["gerber_editor_lin_angle"])
|
||||
# circular array
|
||||
self.pad_direction_radio.set_value(self.app.defaults["gerber_editor_circ_dir"])
|
||||
self.pad_angle_entry.set_value(self.app.defaults["gerber_editor_circ_angle"])
|
||||
self.pad_angle_entry.set_value(float(self.app.defaults["gerber_editor_circ_angle"]))
|
||||
|
||||
def build_ui(self, first_run=None):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user