From 5769998c043e092a114feeb424b2651589c04769 Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Sat, 13 Mar 2021 21:22:13 +0200 Subject: [PATCH] - fixed a bug in Gerber merge - bypassed a bug in FlatCAM Gerber UI - its not really fixed (it's a crash in build UI when disconnecting signals due of the wrapped C++ object already destroyed) --- CHANGELOG.md | 5 +++++ appObjects/FlatCAMGerber.py | 3 +-- appObjects/ObjectCollection.py | 5 ++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cd3afb47..ad61d163 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ CHANGELOG for FlatCAM beta ================================================= +13.03.2021 + +- fixed a bug in Gerber merge +- bypassed a bug in FlatCAM Gerber UI - its not really fixed (it's a crash in build UI when disconnecting signals due of the wrapped C++ object already destroyed) + 11.03.2021 - fixed issue when exporting DXF and not settings the units diff --git a/appObjects/FlatCAMGerber.py b/appObjects/FlatCAMGerber.py index 4136d691..350a4759 100644 --- a/appObjects/FlatCAMGerber.py +++ b/appObjects/FlatCAMGerber.py @@ -1776,8 +1776,7 @@ class GerberObject(FlatCAMObj, Gerber): else: # create a list of integers out of the grb.tools keys and find the max of that value # then, the aperture duplicate is assigned an id value incremented with 1, - # and finally made string because the apertures dict keys are strings - max_ap = str(max([int(k) for k in grb_final.tools.keys()]) + 1) + max_ap = max([int(k) for k in grb_final.tools.keys()]) + 1 grb_final.tools[max_ap] = {} grb_final.tools[max_ap]['geometry'] = [] diff --git a/appObjects/ObjectCollection.py b/appObjects/ObjectCollection.py index 78cf9f0d..e14c3f9a 100644 --- a/appObjects/ObjectCollection.py +++ b/appObjects/ObjectCollection.py @@ -993,7 +993,10 @@ class ObjectCollection(QtCore.QAbstractItemModel): return if obj: - obj.build_ui() + try: + obj.build_ui() + except RuntimeError: + pass self.app.proj_selection_changed.emit(current, previous)