Explorar el Código

- NCC Tool - allow no tool at NCC Tool start (the Preferences have no tool)

Marius Stanciu hace 5 años
padre
commit
5cf363a8db
Se han modificado 2 ficheros con 3 adiciones y 5 borrados
  1. 1 1
      CHANGELOG.md
  2. 2 4
      appTools/ToolNCC.py

+ 1 - 1
CHANGELOG.md

@@ -11,7 +11,7 @@ CHANGELOG for FlatCAM beta
 
 
 - NCC Tool optimization - moved the UI in its own class
 - NCC Tool optimization - moved the UI in its own class
 - NCC Tool optimization - optimized the Tool edit method
 - NCC Tool optimization - optimized the Tool edit method
-
+- NCC Tool - allow no tool at NCC Tool start (the Preferences have no tool)
 
 
 11.06.2020
 11.06.2020
 
 

+ 2 - 4
appTools/ToolNCC.py

@@ -511,10 +511,8 @@ class NonCopperClear(AppTool, Gerber):
             dias = [float(self.app.defaults["tools_ncctools"])]
             dias = [float(self.app.defaults["tools_ncctools"])]
         except (ValueError, TypeError):
         except (ValueError, TypeError):
             dias = [float(eval(dia)) for dia in self.app.defaults["tools_ncctools"].split(",") if dia != '']
             dias = [float(eval(dia)) for dia in self.app.defaults["tools_ncctools"].split(",") if dia != '']
-
-        if not dias:
-            log.error("At least one tool diameter needed. Verify in Edit -> Preferences -> TOOLS -> NCC Tools.")
-            return
+        except Exception:
+            dias = []
 
 
         self.tooluid = 0
         self.tooluid = 0