Просмотр исходного кода

- 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

Marius Stanciu 6 лет назад
Родитель
Сommit
3cf122827f
2 измененных файлов с 4 добавлено и 2 удалено
  1. 1 0
      README.md
  2. 3 2
      flatcamEditors/FlatCAMExcEditor.py

+ 1 - 0
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
 

+ 3 - 2
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: