From 5a929a4c6067cd3c26fce7d003560affd1f15d04 Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Fri, 23 Oct 2020 19:16:56 +0300 Subject: [PATCH] - Excellon UI: fixed a small issue with toggling all rows in Tools Table not toggling off and also the milling section in Utilities was not updated --- CHANGELOG.md | 1 + appObjects/FlatCAMExcellon.py | 12 +++++++++--- appTools/ToolMilling.py | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d666463e..1f40048b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ CHANGELOG for FlatCAM beta - removed Hungarian language since it's looking like is no longer being translated - added a default properties tab which will hold a set of information's about the application - minor changes in the Properties Tool +- Excellon UI: fixed a small issue with toggling all rows in Tools Table not toggling off and also the milling section in Utilities was not updated 22.10.2020 diff --git a/appObjects/FlatCAMExcellon.py b/appObjects/FlatCAMExcellon.py index 06eaa31a..daa4cd81 100644 --- a/appObjects/FlatCAMExcellon.py +++ b/appObjects/FlatCAMExcellon.py @@ -172,6 +172,8 @@ class ExcellonObject(FlatCAMObj, Excellon): self.ui.plot_cb.stateChanged.connect(self.on_plot_cb_click) self.ui.solid_cb.stateChanged.connect(self.on_solid_cb_click) self.ui.multicolored_cb.stateChanged.connect(self.on_multicolored_cb_click) + self.multicolored_build_sig.connect(self.on_multicolored_build) + self.ui.autoload_db_cb.stateChanged.connect(self.on_autoload_db_toggled) # Editor @@ -182,6 +184,7 @@ class ExcellonObject(FlatCAMObj, Excellon): self.calculations_finished.connect(self.update_area_chull) self.ui.drill_button.clicked.connect(lambda: self.app.drilling_tool.run(toggle=True)) + # FIXME will uncomment when Milling Tool is ready # self.ui.milling_button.clicked.connect(lambda: self.app.milling_tool.run(toggle=True)) # UTILITIES @@ -189,10 +192,10 @@ class ExcellonObject(FlatCAMObj, Excellon): self.ui.generate_milling_button.clicked.connect(self.on_generate_milling_button_click) self.ui.generate_milling_slots_button.clicked.connect(self.on_generate_milling_slots_button_click) + # Toggle all Table rows self.ui.tools_table.horizontalHeader().sectionClicked.connect(self.on_toggle_rows) - self.ui.table_visibility_cb.stateChanged.connect(self.on_table_visibility_toggle) - self.multicolored_build_sig.connect(self.on_multicolored_build) + self.ui.table_visibility_cb.stateChanged.connect(self.on_table_visibility_toggle) self.units_found = self.app.defaults['units'] @@ -560,11 +563,14 @@ class ExcellonObject(FlatCAMObj, Excellon): for idx in sel_indexes: sel_rows.add(idx.row()) - if len(sel_rows) == self.ui.tools_table.rowCount(): + # subtract the last 2 rows that show the total and are always displayed but not selected + if len(sel_rows) == self.ui.tools_table.rowCount() - 2: self.ui.tools_table.clearSelection() else: self.ui.tools_table.selectAll() + self.on_row_selection_change() + def get_selected_tools_list(self): """ Returns the keys to the self.tools dictionary corresponding diff --git a/appTools/ToolMilling.py b/appTools/ToolMilling.py index bedebb69..8dd3df90 100644 --- a/appTools/ToolMilling.py +++ b/appTools/ToolMilling.py @@ -52,7 +52,7 @@ class ToolMilling(AppTool, Excellon): # ############################################################################# # ######################### Tool GUI ########################################## # ############################################################################# - self.ui = DrillingUI(layout=self.layout, app=self.app) + self.ui = MillingUI(layout=self.layout, app=self.app) self.toolName = self.ui.toolName # #############################################################################