- fixing a possible error in the Subtract Plugin: trying to remove the aperture with id: 0 will create an exception if this aperture does not exist

This commit is contained in:
Marius Stanciu
2021-10-18 01:57:25 +03:00
committed by Marius
parent 205e6a4ae0
commit 2acc5e9e4c
2 changed files with 5 additions and 1 deletions

View File

@@ -448,7 +448,7 @@ class ToolSub(AppTool):
grb_obj.tools.pop(apid, None)
# delete the 0 aperture if it has no geometry
if not grb_obj.tools[0]['geometry']:
if 0 in grb_obj.tools and not grb_obj.tools[0]['geometry']:
grb_obj.tools.pop(0, None)
poly_buff = []