- wip in adding Exclusion areas in Geometry object; each Geometry object has now a storage for shapes (exclusion shapes, should I make them more general?)

This commit is contained in:
Marius Stanciu
2020-05-06 02:10:18 +03:00
committed by Marius
parent ed105eecad
commit 91493b2fbc
6 changed files with 152 additions and 40 deletions

View File

@@ -5119,12 +5119,17 @@ class App(QtCore.QObject):
for obj_active in self.collection.get_selected():
# if the deleted object is GerberObject then make sure to delete the possible mark shapes
if isinstance(obj_active, GerberObject):
if obj_active.kind == 'gerber':
for el in obj_active.mark_shapes:
obj_active.mark_shapes[el].clear(update=True)
obj_active.mark_shapes[el].enabled = False
# obj_active.mark_shapes[el] = None
del el
# if the deleted object is GerberObject then make sure to delete the possible mark shapes
if obj_active.kind == 'geometry':
obj_active.exclusion_shapes.clear(update=True)
obj_active.exclusion_shapes.enabled = False
del obj_active.exclusion_shapes
elif isinstance(obj_active, CNCJobObject):
try:
obj_active.text_col.enabled = False