- fixed a weird error that created a crash in the following scenario: create a new excellon, edit it, add some drills/slots, delete it without saving, create a new excellon, try to edit and a crash is issued due of a wrapped C++ error

- fixed bug selection in Excellon editor with a selection window in case that the number of selected items is even
- updated the default values to more convenient ones
This commit is contained in:
Marius Stanciu
2019-08-16 16:03:26 +03:00
parent 3a5622ffc6
commit bbc00c8f35
4 changed files with 59 additions and 49 deletions

View File

@@ -4205,9 +4205,10 @@ class FlatCAMGrbEditor(QtCore.QObject):
# select the aperture code of the selected geometry, in the tool table
self.apertures_table.setSelectionMode(QtWidgets.QAbstractItemView.MultiSelection)
for aper in sel_aperture:
for row in range(self.apertures_table.rowCount()):
if str(aper) == self.apertures_table.item(row, 1).text():
self.apertures_table.selectRow(row)
for row_to_sel in range(self.apertures_table.rowCount()):
if str(aper) == self.apertures_table.item(row_to_sel, 1).text():
if row_to_sel not in set(index.row() for index in self.apertures_table.selectedIndexes()):
self.apertures_table.selectRow(row_to_sel)
self.last_aperture_selected = aper
self.apertures_table.setSelectionMode(QtWidgets.QAbstractItemView.ExtendedSelection)