- Gerber Editor: fixed multiple selection with key modifier such that first click selects, second deselects

This commit is contained in:
Marius Stanciu 2019-04-12 00:20:09 +03:00
parent cc6ff98529
commit 3f421b234d
2 changed files with 7 additions and 1 deletions

View File

@ -17,6 +17,7 @@ CAD program, and create G-Code for Isolation routing.
- fixed Excellon Editor selection: when a tool is selected in Tools Table, all the drills belonging to that tool are selected. When a drill is selected on canvas, the associated tool will be selected without automatically selecting all other drills with same tool
- Gerber Editor: added Add Pad Array tool
- Gerber Editor: in Add Pad Array tool, if the pad is not circular type, for circular array the pad will be rotated to match the array angle
- Gerber Editor: fixed multiple selection with key modifier such that first click selects, second deselects
10.04.2019

View File

@ -640,11 +640,16 @@ class FCApertureSelect(DrawTool):
def click_release(self, point):
self.grb_editor_app.apertures_table.clearSelection()
sel_aperture = set()
key_modifier = QtWidgets.QApplication.keyboardModifiers()
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):
if self.draw_app.key == self.draw_app.app.defaults["global_mselect_key"]:
if (self.grb_editor_app.app.defaults["global_mselect_key"] == 'Control' and
key_modifier == Qt.ControlModifier) or \
(self.grb_editor_app.app.defaults["global_mselect_key"] == 'Shift' and
key_modifier == Qt.ShiftModifier):
if shape in self.draw_app.selected:
self.draw_app.selected.remove(shape)
else: