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

- fixed a typo in ToolDB.on_tool_add()

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

+ 3 - 2
FlatCAMCommon.py

@@ -1011,11 +1011,12 @@ class ToolsDB(QtWidgets.QWidget):
             dict_elem['tooldia'] = self.app.defaults["geometry_cnctooldia"]
         else:
             try:
-                tools_string = self.defaults["geometry_cnctooldia"].split(",")
+                tools_string = self.app.defaults["geometry_cnctooldia"].split(",")
                 tools_diameters = [eval(a) for a in tools_string if a != '']
                 dict_elem['tooldia'] = tools_diameters[0] if tools_diameters else 0.0
             except Exception as e:
-                self.app.log.debug("ToolDB.build_db_ui.on_tool_add() --> %s" % str(e))
+                self.app.log.debug("ToolDB.on_tool_add() --> %s" % str(e))
+                return
 
         dict_elem['offset'] = 'Path'
         dict_elem['offset_value'] = 0.0

+ 1 - 0
README.md

@@ -13,6 +13,7 @@ CAD program, and create G-Code for Isolation routing.
 
 - edited some icons so they don't contain white background
 - fixed an incorrect usage of object in the app.select_objects() method
+- fixed a typo in ToolDB.on_tool_add()
 
 23.12.2019