- made sure that the annotations are deleted when the object that contain them is deleted

This commit is contained in:
Marius Stanciu 2019-08-11 02:55:08 +03:00
parent cf8a277825
commit 9ef7b2668c
2 changed files with 8 additions and 1 deletions

View File

@ -4861,7 +4861,7 @@ class App(QtCore.QObject):
if self.collection.get_active():
self.log.debug("App.on_delete()")
while (self.collection.get_active()):
while self.collection.get_active():
obj_active = self.collection.get_active()
# if the deleted object is FlatCAMGerber then make sure to delete the possible mark shapes
if isinstance(obj_active, FlatCAMGerber):
@ -4869,6 +4869,12 @@ class App(QtCore.QObject):
obj_active.mark_shapes[el].clear(update=True)
obj_active.mark_shapes[el].enabled = False
obj_active.mark_shapes[el] = None
elif isinstance(obj_active, FlatCAMCNCjob):
try:
obj_active.annotation.clear(update=True)
obj_active.annotation.enabled = False
except AttributeError:
pass
self.delete_first_selected()
self.inform.emit(_("Object(s) deleted ..."))

View File

@ -13,6 +13,7 @@ CAD program, and create G-Code for Isolation routing.
- small changes regarding the Project Title
- trying to fix reported bugs
- made sure that the annotations are deleted when the object that contain them is deleted
10.08.2019