diff --git a/CHANGELOG.md b/CHANGELOG.md index c089884f..b92c6208 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,8 +10,9 @@ CHANGELOG for FlatCAM beta 28.09.2021 - changed the circle resolution back to the default of 16 since this value is good for fast rendering of Gerber files -- added a shortcut to select all apertures in the Gerber Editor +- added a shortcut to select all apertures in the Gerber Editor (Ctrl+A) - other minor fixes +- added a shortcut to select all apertures in the Excellon Editor (Ctrl+A) 27.09.2021 diff --git a/appEditors/AppExcEditor.py b/appEditors/AppExcEditor.py index 69e9b2cb..f23093ed 100644 --- a/appEditors/AppExcEditor.py +++ b/appEditors/AppExcEditor.py @@ -1890,6 +1890,7 @@ class AppExcEditor(QtCore.QObject): self.ui.deltool_btn.clicked.connect(self.on_tool_delete) # self.ui.tools_table_exc.selectionModel().currentChanged.connect(self.on_row_selected) self.ui.tools_table_exc.cellPressed.connect(self.on_row_selected) + self.ui.tools_table_exc.selectionModel().selectionChanged.connect(self.on_table_selection) self.ui.array_type_radio.activated_custom.connect(self.on_array_type_radio) self.ui.slot_array_type_radio.activated_custom.connect(self.on_slot_array_type_radio) @@ -3221,6 +3222,18 @@ class AppExcEditor(QtCore.QObject): self.replot() + def on_table_selection(self): + selected_rows = self.ui.tools_table_exc.selectionModel().selectedRows(0) + + if len(selected_rows) == self.ui.tools_table_exc.rowCount(): + for row in range(self.ui.tools_table_exc.rowCount() - 2): # last 2 columns have no diameter + sel_dia = self.app.dec_format(float(self.ui.tools_table_exc.item(row, 1).text()), self.app.decimals) + for obj in self.storage_dict[sel_dia].get_objects(): + self.selected.append(obj) + self.replot() + return True + return False + def on_canvas_click(self, event): """ event.x and .y have canvas coordinates diff --git a/appGUI/MainGUI.py b/appGUI/MainGUI.py index 549316ae..0557f683 100644 --- a/appGUI/MainGUI.py +++ b/appGUI/MainGUI.py @@ -3833,6 +3833,11 @@ class MainGUI(QtWidgets.QMainWindow): elif self.app.call_source == 'exc_editor': # CTRL if modifiers == QtCore.Qt.KeyboardModifier.ControlModifier: + # Select All + if key == QtCore.Qt.Key.Key_E or key == 'A': + self.app.exc_editor.ui.tools_table_exc.selectAll() + return + # save (update) the current geometry and return to the App if key == QtCore.Qt.Key.Key_S or key == 'S': self.app.editor2object()