From 3cf122827f8fbe7f80141841b21431cb4ca43b7d Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Tue, 7 May 2019 00:12:19 +0300 Subject: [PATCH] - solved a bug in Excellon Editor that caused app crash when trying to edit a tool in Tool Table due of missing a tool offset --- README.md | 1 + flatcamEditors/FlatCAMExcEditor.py | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2d405f75..61b3a709 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ CAD program, and create G-Code for Isolation routing. - remade the way the aperture marks are plotted in Gerber Object - fixed some bugs related to moving an Gerber object with the aperture table in view - added a new parameter in the Edit -> Preferences -> App Preferences named Geo Tolerance. This parameter control the level of geometric detail throughout FlatCAM. It directly influence the effect of Circle Steps parameter. +- solved a bug in Excellon Editor that caused app crash when trying to edit a tool in Tool Table due of missing a tool offset 5.05.2019 diff --git a/flatcamEditors/FlatCAMExcEditor.py b/flatcamEditors/FlatCAMExcEditor.py index 00318a38..763b80aa 100644 --- a/flatcamEditors/FlatCAMExcEditor.py +++ b/flatcamEditors/FlatCAMExcEditor.py @@ -1565,8 +1565,9 @@ class FlatCAMExcEditor(QtCore.QObject): self.tool2tooldia[key_in_tool2tooldia] = current_table_dia_edited # update the tool offset - modified_offset = self.exc_obj.tool_offset.pop(dia_changed) - self.exc_obj.tool_offset[current_table_dia_edited] = modified_offset + modified_offset = self.exc_obj.tool_offset.pop(dia_changed ,None) + if modified_offset is not None: + self.exc_obj.tool_offset[current_table_dia_edited] = modified_offset self.replot() else: