From 2acc5e9e4c89cca0644872af46c112c74cf412de Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Mon, 18 Oct 2021 01:57:25 +0300 Subject: [PATCH] - 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 --- CHANGELOG.md | 4 ++++ appPlugins/ToolSub.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d79338dd..af232034 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ CHANGELOG for FlatCAM beta ================================================= +18.10.2021 + +- 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 + 15.10.2021 - added an ugly form of extra pad passes functionality in Isolation Plugin - does not take into consideration the milling direction diff --git a/appPlugins/ToolSub.py b/appPlugins/ToolSub.py index bf678f6e..f83f6dc6 100644 --- a/appPlugins/ToolSub.py +++ b/appPlugins/ToolSub.py @@ -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 = []