- the Plugins object combo boxes are no longer updated on object selection on Project tab generally but only for the Plugin that is current, if any

- in Corner Markers Plugin I added a new feature, ability to insert existing markers into external objects. Finished the work for external Gerbers and work in progress for the external Geometry
This commit is contained in:
Marius Stanciu
2021-10-08 01:53:36 +03:00
committed by Marius
parent 26354e1f9e
commit 6f884f4d64
14 changed files with 453 additions and 122 deletions

View File

@@ -1340,19 +1340,26 @@ class ToolMilling(AppTool, Excellon):
self.ui.generate_cnc_button.setDisabled(True)
def on_object_selection_changed(self, current, previous):
try:
sel_obj = current.indexes()[0].internalPointer().obj
name = sel_obj.options['name']
kind = sel_obj.kind
if kind == 'excellon':
self.ui.target_radio.set_value('exc')
self.ui.object_combo.set_value(name)
found_idx = None
for tab_idx in range(self.app.ui.notebook.count()):
if self.app.ui.notebook.tabText(tab_idx) == self.ui.pluginName:
found_idx = True
break
if kind == 'geometry':
self.ui.target_radio.set_value('geo')
self.ui.object_combo.set_value(name)
except Exception:
pass
if found_idx:
try:
sel_obj = current.indexes()[0].internalPointer().obj
name = sel_obj.options['name']
kind = sel_obj.kind
if kind == 'excellon':
self.ui.target_radio.set_value('exc')
self.ui.object_combo.set_value(name)
if kind == 'geometry':
self.ui.target_radio.set_value('geo')
self.ui.object_combo.set_value(name)
except Exception:
pass
def on_job_changed(self, idx):
if self.ui.target_radio.get_value() == 'geo':