- fixed an issue with the tool table context menu in Paint Tool
- made some changes in the GUI in Paint Tool, NCC Tool and SolderPaste Tool
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
|
||||
from FlatCAMTool import FlatCAMTool
|
||||
from FlatCAMCommon import LoudDict
|
||||
from flatcamGUI.GUIElements import FCComboBox, FCEntry, FCEntry2, FCTable
|
||||
from flatcamGUI.GUIElements import FCComboBox, FCEntry, FCEntry2, FCTable, FCInputDialog
|
||||
from FlatCAMApp import log
|
||||
from camlib import distance
|
||||
from FlatCAMObj import FlatCAMCNCjob
|
||||
@@ -460,6 +460,22 @@ class SolderPaste(FlatCAMTool):
|
||||
def install(self, icon=None, separator=None, **kwargs):
|
||||
FlatCAMTool.install(self, icon, separator, shortcut='ALT+K', **kwargs)
|
||||
|
||||
def on_add_tool_by_key(self):
|
||||
tool_add_popup = FCInputDialog(title='%s...' % _("New Tool"),
|
||||
text='%s:' % _('Enter a Tool Diameter'),
|
||||
min=0.0000, max=99.9999, decimals=4)
|
||||
tool_add_popup.setWindowIcon(QtGui.QIcon('share/letter_t_32.png'))
|
||||
|
||||
val, ok = tool_add_popup.get_value()
|
||||
if ok:
|
||||
if float(val) == 0:
|
||||
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))
|
||||
else:
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s...' % _("Adding Tool cancelled"))
|
||||
|
||||
def set_tool_ui(self):
|
||||
self.form_fields.update({
|
||||
"tools_solderpaste_new": self.addtool_entry,
|
||||
|
||||
Reference in New Issue
Block a user