- Gerber Editor: working on aperture selection to show on Aperture Table

This commit is contained in:
Marius Stanciu
2019-04-09 17:56:28 +03:00
parent 68a6f64fcd
commit fbdcb00eb3
2 changed files with 15 additions and 1 deletions

View File

@@ -12,6 +12,7 @@ CAD program, and create G-Code for Isolation routing.
9.04.2019
- Gerber Editor: added buffer and scale tools
- Gerber Editor: working on aperture selection to show on Aperture Table
7.04.2019

View File

@@ -448,7 +448,20 @@ class FCApertureSelect(DrawTool):
self.grb_editor_app.selected = []
def click_release(self, point):
# self.select_shapes(point)
self.grb_editor_app.apertures_table.clearSelection()
sel_aperture = set()
for storage in self.grb_editor_app.storage_dict:
for shape in self.grb_editor_app.storage_dict[storage]['solid_geometry']:
if Point(point).within(shape.geo):
sel_aperture.add(storage)
try:
self.grb_editor_app.apertures_table.itemClicked.disconnect()
except:
pass
for aper in sel_aperture:
for row in range(self.grb_editor_app.apertures_table.rowCount()):
if str(aper) == self.grb_editor_app.apertures_table.item(row, 1).text():
self.grb_editor_app.apertures_table.selectRow(row)
return ""
# def select_shapes(self, pos):