diff --git a/README.md b/README.md index 47de23b6..ed313ad1 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,10 @@ CAD program, and create G-Code for Isolation routing. ================================================= +17.04.2019 + +- Gerber Editor: added some messages to warn user if no selection exists when trying to do aperture deletion or aperture geometry deletion + 16.04.2019 - added ability to use ENTER key to finish tool adding in Editors, NCC Tool, Paint Tool and SolderPaste Tool. diff --git a/flatcamEditors/FlatCAMGrbEditor.py b/flatcamEditors/FlatCAMGrbEditor.py index 4e7c5a2f..7255cbb0 100644 --- a/flatcamEditors/FlatCAMGrbEditor.py +++ b/flatcamEditors/FlatCAMGrbEditor.py @@ -1962,6 +1962,9 @@ class FlatCAMGrbEditor(QtCore.QObject): try: if apid is None or apid is False: # deleted_tool_dia = float(self.apertures_table.item(self.apertures_table.currentRow(), 1).text()) + if len(self.apertures_table.selectionModel().selectedRows()) == 0: + self.app.inform.emit(_("[WARNING_NOTCL] Select an aperture in Aperture Table")) + return for index in self.apertures_table.selectionModel().selectedRows(): row = index.row() deleted_apcode_list.append(self.apertures_table.item(row, 1).text()) @@ -1972,7 +1975,7 @@ class FlatCAMGrbEditor(QtCore.QObject): else: deleted_apcode_list.append(apid) except: - self.app.inform.emit(_("[WARNING_NOTCL] Select a tool in Tool Table")) + self.app.inform.emit(_("[WARNING_NOTCL] Select an aperture in Aperture Table")) return for deleted_aperture in deleted_apcode_list: @@ -2964,12 +2967,17 @@ class FlatCAMGrbEditor(QtCore.QObject): def delete_selected(self): temp_ref = [s for s in self.selected] + + if len(temp_ref) == 0: + self.app.inform.emit(_("[ERROR_NOTCL] Failed. No aperture geometry is selected.")) + return + for shape_sel in temp_ref: self.delete_shape(shape_sel) self.selected = [] self.build_ui() - self.app.inform.emit(_("[success] Done. Apertures deleted.")) + self.app.inform.emit(_("[success] Done. Apertures geometry deleted.")) def delete_shape(self, shape): self.is_modified = True