From af0fce63e9e605c65f45037301655109388134bf Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Fri, 8 Oct 2021 22:36:09 +0300 Subject: [PATCH] - in Corner Markers Plugin - finished the feature of adding markers geometry to an external Geometry object --- CHANGELOG.md | 1 + appPlugins/ToolCorners.py | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e3e5fb72..043c6469 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ CHANGELOG for FlatCAM beta - the Plugins object combo boxes are no longer updated on object selection on Project tab generally but only for the Plugin that is current, if any - in Corner Markers Plugin I added a new feature, ability to insert existing markers into external objects. Finished the work for external Gerbers and work in progress for the external Geometry - the Editors require an Object UI build before launching; I've added the required code so the shortcut keys work even if the Properties tab is not current +- in Corner Markers Plugin - finished the feature of adding markers geometry to an external Geometry object 7.10.2021 diff --git a/appPlugins/ToolCorners.py b/appPlugins/ToolCorners.py index be544559..1d34ea9b 100644 --- a/appPlugins/ToolCorners.py +++ b/appPlugins/ToolCorners.py @@ -630,6 +630,11 @@ class ToolCorners(AppTool): } } + # remove possible tools without geometry + for tool in list(new_tools.keys()): + if not new_tools[tool]['solid_geometry']: + new_tools.pop(tool) + s_list = [] if new_geo_obj.solid_geometry: if isinstance(new_geo_obj.solid_geometry, MultiPolygon): @@ -653,8 +658,7 @@ class ToolCorners(AppTool): def initialize(geo_obj, app_obj): geo_obj.options = LoudDict() for opt in new_geo_obj.options: - if opt != 'name' and opt in geo_obj.options: - geo_obj.options[opt] = deepcopy(app_obj.options[opt]) + geo_obj.options[opt] = deepcopy(new_geo_obj.options[opt]) geo_obj.options['name'] = outname # Propagate options