- in ParseExcellon.Excellon the self.tools dict has now a key 'data' which holds a dict with all the default values for Excellon and Geometry

- Excellon and Geometry objects, when started with multiple tools selected, the parameters tool name reflect this situation
This commit is contained in:
Marius Stanciu
2020-01-16 16:43:39 +02:00
parent 0221a9cfb6
commit b71d4e8c45
3 changed files with 44 additions and 7 deletions

View File

@@ -2622,9 +2622,10 @@ class FlatCAMExcellon(FlatCAMObj, Excellon):
# sort the tool diameter column
# self.ui.tools_table.sortItems(1)
# all the tools are selected by default
self.ui.tools_table.selectColumn(0)
#
self.ui.tools_table.resizeColumnsToContents()
self.ui.tools_table.resizeRowsToContents()
@@ -2686,6 +2687,16 @@ class FlatCAMExcellon(FlatCAMObj, Excellon):
except (TypeError, AttributeError):
pass
# set the text on tool_data_label after loading the object
sel_rows = list()
sel_items = self.ui.tools_table.selectedItems()
for it in sel_items:
sel_rows.append(it.row())
if len(sel_rows) > 1:
self.ui.tool_data_label.setText(
"<b>%s: <font color='#0000FF'>%s</font></b>" % (_('Parameters for'), _("Multiple Tools"))
)
self.ui_connect()
def set_ui(self, ui):
@@ -3855,6 +3866,16 @@ class FlatCAMGeometry(FlatCAMObj, Geometry):
self.ui.e_cut_entry.setDisabled(False) if self.ui.extracut_cb.get_value() else \
self.ui.e_cut_entry.setDisabled(True)
# set the text on tool_data_label after loading the object
sel_rows = list()
sel_items = self.ui.geo_tools_table.selectedItems()
for it in sel_items:
sel_rows.append(it.row())
if len(sel_rows) > 1:
self.ui.tool_data_label.setText(
"<b>%s: <font color='#0000FF'>%s</font></b>" % (_('Parameters for'), _("Multiple Tools"))
)
def set_ui(self, ui):
FlatCAMObj.set_ui(self, ui)