فهرست منبع

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

Marius Stanciu 6 سال پیش
والد
کامیت
3f421b234d
2فایلهای تغییر یافته به همراه7 افزوده شده و 1 حذف شده
  1. 1 0
      README.md
  2. 6 1
      flatcamEditors/FlatCAMGrbEditor.py

+ 1 - 0
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
 - 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: 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: 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
 10.04.2019
 
 

+ 6 - 1
flatcamEditors/FlatCAMGrbEditor.py

@@ -640,11 +640,16 @@ class FCApertureSelect(DrawTool):
     def click_release(self, point):
     def click_release(self, point):
         self.grb_editor_app.apertures_table.clearSelection()
         self.grb_editor_app.apertures_table.clearSelection()
         sel_aperture = set()
         sel_aperture = set()
+        key_modifier = QtWidgets.QApplication.keyboardModifiers()
 
 
         for storage in self.grb_editor_app.storage_dict:
         for storage in self.grb_editor_app.storage_dict:
             for shape in self.grb_editor_app.storage_dict[storage]['solid_geometry']:
             for shape in self.grb_editor_app.storage_dict[storage]['solid_geometry']:
                 if Point(point).within(shape.geo):
                 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:
                         if shape in self.draw_app.selected:
                             self.draw_app.selected.remove(shape)
                             self.draw_app.selected.remove(shape)
                         else:
                         else: