- Gerber Editor: added some messages to warn user if no selection exists when trying to do aperture deletion or aperture geometry deletion
This commit is contained in:
parent
7707baa9b2
commit
b35dc84f0d
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue