From 9ef7b2668c863c9364a7f224cacda8fe22ea623c Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Sun, 11 Aug 2019 02:55:08 +0300 Subject: [PATCH] - made sure that the annotations are deleted when the object that contain them is deleted --- FlatCAMApp.py | 8 +++++++- README.md | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/FlatCAMApp.py b/FlatCAMApp.py index 2416b7d1..9f3419b4 100644 --- a/FlatCAMApp.py +++ b/FlatCAMApp.py @@ -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 ...")) diff --git a/README.md b/README.md index 08c78261..debb577a 100644 --- a/README.md +++ b/README.md @@ -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