From 3f421b234dfe8cba25a5cfd1cbc99408f53518ec Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Fri, 12 Apr 2019 00:20:09 +0300 Subject: [PATCH] - Gerber Editor: fixed multiple selection with key modifier such that first click selects, second deselects --- README.md | 1 + flatcamEditors/FlatCAMGrbEditor.py | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5d3b121b..bc46255b 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/flatcamEditors/FlatCAMGrbEditor.py b/flatcamEditors/FlatCAMGrbEditor.py index 3480230e..b6784a02 100644 --- a/flatcamEditors/FlatCAMGrbEditor.py +++ b/flatcamEditors/FlatCAMGrbEditor.py @@ -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: