- the application now uses only the default values from the app.options dict, the app.defaults dict holds the definitive default values
- fixed some outstanding issues from the PyQt6 port - PEP8 fixes - minor fixes - updated the saving of Preferences to update the self.options too: the `Apply` action will update the self.options but the `Save` action will save the updated preferences to the file on disk
This commit is contained in:
@@ -184,30 +184,30 @@ class ToolExtract(AppTool):
|
||||
|
||||
self.ui_disconnect()
|
||||
self.ui_connect()
|
||||
self.ui.method_radio.set_value(self.app.defaults["tools_extract_hole_type"])
|
||||
self.ui.method_radio.set_value(self.app.options["tools_extract_hole_type"])
|
||||
|
||||
self.ui.dia_entry.set_value(float(self.app.defaults["tools_extract_hole_fixed_dia"]))
|
||||
self.ui.dia_entry.set_value(float(self.app.options["tools_extract_hole_fixed_dia"]))
|
||||
|
||||
self.ui.circular_ring_entry.set_value(float(self.app.defaults["tools_extract_circular_ring"]))
|
||||
self.ui.oblong_ring_entry.set_value(float(self.app.defaults["tools_extract_oblong_ring"]))
|
||||
self.ui.square_ring_entry.set_value(float(self.app.defaults["tools_extract_square_ring"]))
|
||||
self.ui.rectangular_ring_entry.set_value(float(self.app.defaults["tools_extract_rectangular_ring"]))
|
||||
self.ui.other_ring_entry.set_value(float(self.app.defaults["tools_extract_others_ring"]))
|
||||
self.ui.circular_ring_entry.set_value(float(self.app.options["tools_extract_circular_ring"]))
|
||||
self.ui.oblong_ring_entry.set_value(float(self.app.options["tools_extract_oblong_ring"]))
|
||||
self.ui.square_ring_entry.set_value(float(self.app.options["tools_extract_square_ring"]))
|
||||
self.ui.rectangular_ring_entry.set_value(float(self.app.options["tools_extract_rectangular_ring"]))
|
||||
self.ui.other_ring_entry.set_value(float(self.app.options["tools_extract_others_ring"]))
|
||||
|
||||
self.ui.circular_cb.set_value(self.app.defaults["tools_extract_circular"])
|
||||
self.ui.oblong_cb.set_value(self.app.defaults["tools_extract_oblong"])
|
||||
self.ui.square_cb.set_value(self.app.defaults["tools_extract_square"])
|
||||
self.ui.rectangular_cb.set_value(self.app.defaults["tools_extract_rectangular"])
|
||||
self.ui.other_cb.set_value(self.app.defaults["tools_extract_others"])
|
||||
self.ui.circular_cb.set_value(self.app.options["tools_extract_circular"])
|
||||
self.ui.oblong_cb.set_value(self.app.options["tools_extract_oblong"])
|
||||
self.ui.square_cb.set_value(self.app.options["tools_extract_square"])
|
||||
self.ui.rectangular_cb.set_value(self.app.options["tools_extract_rectangular"])
|
||||
self.ui.other_cb.set_value(self.app.options["tools_extract_others"])
|
||||
|
||||
self.ui.factor_entry.set_value(float(self.app.defaults["tools_extract_hole_prop_factor"]))
|
||||
self.ui.factor_entry.set_value(float(self.app.options["tools_extract_hole_prop_factor"]))
|
||||
|
||||
# Extract Soldermask
|
||||
self.ui.clearance_entry.set_value(float(self.app.defaults["tools_extract_sm_clearance"]))
|
||||
self.ui.clearance_entry.set_value(float(self.app.options["tools_extract_sm_clearance"]))
|
||||
|
||||
# Extract Cutout
|
||||
self.ui.margin_cut_entry.set_value(float(self.app.defaults["tools_extract_cut_margin"]))
|
||||
self.ui.thick_cut_entry.set_value(float(self.app.defaults["tools_extract_cut_thickness"]))
|
||||
self.ui.margin_cut_entry.set_value(float(self.app.options["tools_extract_cut_margin"]))
|
||||
self.ui.thick_cut_entry.set_value(float(self.app.options["tools_extract_cut_thickness"]))
|
||||
|
||||
# SELECT THE CURRENT OBJECT
|
||||
obj = self.app.collection.get_active()
|
||||
@@ -928,7 +928,7 @@ class ToolExtract(AppTool):
|
||||
|
||||
if self.ui.apertures_table.cellWidget(cw_row, 3).isChecked():
|
||||
# self.plot_aperture(color='#2d4606bf', marked_aperture=aperture, visible=True)
|
||||
color = self.app.defaults['global_sel_draw_color']
|
||||
color = self.app.options['global_sel_draw_color']
|
||||
color = (color + 'AA') if len(color) == 7 else (color[:-2] + 'AA')
|
||||
grb_obj.plot_aperture(color=color, marked_aperture=aperture, visible=True, run_thread=True)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user