- work in Paint Tool GUI functionality
This commit is contained in:
@@ -15,6 +15,7 @@ CAD program, and create G-Code for Isolation routing.
|
|||||||
- added new functionality (key shortcut SHIFT+J) to locate the corners of the bounding box (and center) in a selected object
|
- added new functionality (key shortcut SHIFT+J) to locate the corners of the bounding box (and center) in a selected object
|
||||||
- modified the NCC Tool GUI to prepare for accepting a tool from a tool database
|
- modified the NCC Tool GUI to prepare for accepting a tool from a tool database
|
||||||
- started to modify the Paint Tool to be similar to NCC Tool and to accept a tool from a database
|
- started to modify the Paint Tool to be similar to NCC Tool and to accept a tool from a database
|
||||||
|
- work in Paint Tool GUI functionality
|
||||||
|
|
||||||
14.01.2020
|
14.01.2020
|
||||||
|
|
||||||
|
|||||||
@@ -1034,11 +1034,7 @@ class ToolPaint(FlatCAMTool, Gerber):
|
|||||||
self.tools_table.setContextMenuPolicy(Qt.NoContextMenu)
|
self.tools_table.setContextMenuPolicy(Qt.NoContextMenu)
|
||||||
|
|
||||||
def build_ui(self):
|
def build_ui(self):
|
||||||
try:
|
self.ui_disconnect()
|
||||||
# if connected, disconnect the signal from the slot on item_changed as it creates issues
|
|
||||||
self.tools_table.itemChanged.disconnect()
|
|
||||||
except (TypeError, AttributeError):
|
|
||||||
pass
|
|
||||||
|
|
||||||
# updated units
|
# updated units
|
||||||
self.units = self.app.defaults['units'].upper()
|
self.units = self.app.defaults['units'].upper()
|
||||||
@@ -1119,8 +1115,7 @@ class ToolPaint(FlatCAMTool, Gerber):
|
|||||||
self.tools_table.setMinimumHeight(self.tools_table.getHeight())
|
self.tools_table.setMinimumHeight(self.tools_table.getHeight())
|
||||||
self.tools_table.setMaximumHeight(self.tools_table.getHeight())
|
self.tools_table.setMaximumHeight(self.tools_table.getHeight())
|
||||||
|
|
||||||
# we reactivate the signals after the after the tool adding as we don't need to see the tool been populated
|
self.ui_connect()
|
||||||
self.tools_table.itemChanged.connect(self.on_tool_edit)
|
|
||||||
|
|
||||||
def on_combo_box_type(self):
|
def on_combo_box_type(self):
|
||||||
obj_type = self.box_combo_type.currentIndex()
|
obj_type = self.box_combo_type.currentIndex()
|
||||||
@@ -1166,21 +1161,19 @@ class ToolPaint(FlatCAMTool, Gerber):
|
|||||||
|
|
||||||
if float('%.*f' % (self.decimals, tool_dia)) in tool_dias:
|
if float('%.*f' % (self.decimals, tool_dia)) in tool_dias:
|
||||||
if muted is None:
|
if muted is None:
|
||||||
self.app.inform.emit('[WARNING_NOTCL] %s' %
|
self.app.inform.emit('[WARNING_NOTCL] %s' % _("Adding tool cancelled. Tool already in Tool Table."))
|
||||||
_("Adding tool cancelled. Tool already in Tool Table."))
|
|
||||||
self.tools_table.itemChanged.connect(self.on_tool_edit)
|
self.tools_table.itemChanged.connect(self.on_tool_edit)
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
if muted is None:
|
if muted is None:
|
||||||
self.app.inform.emit('[success] %s' %
|
self.app.inform.emit('[success] %s' % _("New tool added to Tool Table."))
|
||||||
_("New tool added to Tool Table."))
|
|
||||||
self.paint_tools.update({
|
self.paint_tools.update({
|
||||||
int(self.tooluid): {
|
int(self.tooluid): {
|
||||||
'tooldia': float('%.*f' % (self.decimals, tool_dia)),
|
'tooldia': float('%.*f' % (self.decimals, tool_dia)),
|
||||||
'offset': 'Path',
|
'offset': 'Path',
|
||||||
'offset_value': 0.0,
|
'offset_value': 0.0,
|
||||||
'type': 'Iso',
|
'type': 'Iso',
|
||||||
'tool_type': 'V',
|
'tool_type': self.tool_type_radio.get_value(),
|
||||||
'data': dict(self.default_data),
|
'data': dict(self.default_data),
|
||||||
'solid_geometry': []
|
'solid_geometry': []
|
||||||
}
|
}
|
||||||
@@ -3109,9 +3102,8 @@ class ToolPaint(FlatCAMTool, Gerber):
|
|||||||
elif isinstance(current_widget, FCDoubleSpinner):
|
elif isinstance(current_widget, FCDoubleSpinner):
|
||||||
current_widget.returnPressed.connect(self.form_to_storage)
|
current_widget.returnPressed.connect(self.form_to_storage)
|
||||||
|
|
||||||
self.ncc_choice_offset_cb.stateChanged.connect(self.on_offset_choice)
|
self.rest_cb.stateChanged.connect(self.on_rest_machining_check)
|
||||||
self.ncc_rest_cb.stateChanged.connect(self.on_rest_machining_check)
|
self.order_radio.activated_custom[str].connect(self.on_order_changed)
|
||||||
self.ncc_order_radio.activated_custom[str].connect(self.on_order_changed)
|
|
||||||
|
|
||||||
def ui_disconnect(self):
|
def ui_disconnect(self):
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user