- made sure that the message that exclusion areas are deleted is displayed only if there are shapes in the exclusion areas storage

This commit is contained in:
Marius Stanciu 2020-06-07 17:28:09 +03:00 committed by Marius
parent 5ce7011123
commit 329a3262ee
2 changed files with 5 additions and 1 deletions

View File

@ -14,6 +14,7 @@ CHANGELOG for FlatCAM beta
- fixed a small issue in Gerber file opener filter that did not see the *.TOP extension or *.outline extension
- in Excellon parser added a way to "guestimate" the units if no units are detected in the header. I may need to make it optional in Preferences
- changed the Excellon defaults for zeros suppression to TZ (assumed that most Excellon without units in header will come out of older Eagle) and the Excellon export default is now with coordinates in decimal
- made sure that the message that exclusion areas are deleted is displayed only if there are shapes in the exclusion areas storage
6.06.2020

View File

@ -565,11 +565,12 @@ class ExclusionAreas(QtCore.QObject):
:return: None
:rtype:
"""
if self.exclusion_areas_storage:
self.app.inform.emit('%s' % _("All exclusion zones deleted."))
self.exclusion_areas_storage.clear()
AppTool.delete_moving_selection_shape(self)
self.app.delete_selection_shape()
AppTool.delete_tool_selection_shape(self, shapes_storage=self.exclusion_shapes)
self.app.inform.emit('%s' % _("All exclusion zones deleted."))
def delete_sel_shapes(self, idxs):
"""
@ -604,6 +605,7 @@ class ExclusionAreas(QtCore.QObject):
if self.app.is_legacy is True:
self.exclusion_shapes.redraw()
# if there are still some exclusion areas in the storage
if self.exclusion_areas_storage:
self.app.inform.emit('[success] %s' % _("Selected exclusion zones deleted."))
else:
@ -618,6 +620,7 @@ class ExclusionAreas(QtCore.QObject):
""")
self.cnc_button.setToolTip('%s' % _("Generate the CNC Job object."))
# there are no more exclusion areas in the storage, all have been selected and deleted
self.app.inform.emit('%s' % _("All exclusion zones deleted."))
def travel_coordinates(self, start_point, end_point, tooldia):