فهرست منبع

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

Marius Stanciu 6 سال پیش
والد
کامیت
9ef7b2668c
2فایلهای تغییر یافته به همراه8 افزوده شده و 1 حذف شده
  1. 7 1
      FlatCAMApp.py
  2. 1 0
      README.md

+ 7 - 1
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 ..."))

+ 1 - 0
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