- NCC Tool - upgraded the UI and added the functionality that now adding a new tool is done by first searching the Tools DB for a suitable tool and if fails then it adds an default tool
- NCC Tool - on start will attempt to search in the Tools DB for the default tools and if found will load them from the DB - fixes in NCC, Paint and Isolation Tool due of recent changes
This commit is contained in:
@@ -394,7 +394,7 @@ class ToolPaint(AppTool, Gerber):
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' %
|
||||
_("Please enter a tool diameter with non-zero value, in Float format."))
|
||||
return
|
||||
self.on_tool_add(dia=float(val))
|
||||
self.on_tool_add(custom_dia=float(val))
|
||||
else:
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s...' % _("Adding Tool cancelled"))
|
||||
|
||||
@@ -702,7 +702,7 @@ class ToolPaint(AppTool, Gerber):
|
||||
self.app.log.error("Could not load tools DB file.")
|
||||
self.app.inform.emit('[ERROR] %s' % _("Could not load Tools DB file."))
|
||||
self.blockSignals(False)
|
||||
self.on_tool_default_add()
|
||||
self.on_tool_default_add(dia=tool_dia)
|
||||
return
|
||||
|
||||
try:
|
||||
@@ -713,7 +713,7 @@ class ToolPaint(AppTool, Gerber):
|
||||
self.app.log.error(str(e))
|
||||
self.app.inform.emit('[ERROR] %s' % _("Failed to parse Tools DB file."))
|
||||
self.blockSignals(False)
|
||||
self.on_tool_default_add()
|
||||
self.on_tool_default_add(dia=tool_dia)
|
||||
return
|
||||
|
||||
tool_found = 0
|
||||
@@ -764,7 +764,8 @@ class ToolPaint(AppTool, Gerber):
|
||||
# test we found a suitable tool in Tools Database or if multiple ones
|
||||
if tool_found == 0:
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s' % _("Tool not in Tools Database. Adding a default tool."))
|
||||
self.on_tool_default_add()
|
||||
self.on_tool_default_add(dia=tool_dia)
|
||||
|
||||
self.blockSignals(False)
|
||||
return
|
||||
|
||||
@@ -868,7 +869,7 @@ class ToolPaint(AppTool, Gerber):
|
||||
self.update_ui()
|
||||
|
||||
if muted is None:
|
||||
self.app.inform.emit('[success] %s' % _("New tool added to Tool Table."))
|
||||
self.app.inform.emit('[success] %s' % _("Default tool added to Tool Table."))
|
||||
|
||||
def on_tool_edit(self, item):
|
||||
self.blockSignals(True)
|
||||
|
||||
Reference in New Issue
Block a user