- in Geometry Property Tab, clicking the tools table header will toggle the selection for all tools in the table
This commit is contained in:
@@ -11,6 +11,7 @@ CHANGELOG for FlatCAM beta
|
|||||||
|
|
||||||
- in Isolation Plugin there is no longer auto-switch to Properties Tab
|
- in Isolation Plugin there is no longer auto-switch to Properties Tab
|
||||||
- when editing Geometry objects with multiple geometry fixed the issue with the edited geometry always being the one in the first tool
|
- when editing Geometry objects with multiple geometry fixed the issue with the edited geometry always being the one in the first tool
|
||||||
|
- in Geometry Property Tab, clicking the tools table header will toggle the selection for all tools in the table
|
||||||
|
|
||||||
1.11.2021
|
1.11.2021
|
||||||
|
|
||||||
|
|||||||
@@ -395,7 +395,7 @@ class GeometryObject(FlatCAMObj, Geometry):
|
|||||||
self.set_offset_values()
|
self.set_offset_values()
|
||||||
|
|
||||||
self.ui.geo_tools_table.itemSelectionChanged.connect(self.on_row_changed)
|
self.ui.geo_tools_table.itemSelectionChanged.connect(self.on_row_changed)
|
||||||
|
self.ui.geo_tools_table.horizontalHeader().sectionClicked.connect(self.table_toggle_all)
|
||||||
# Show/Hide Advanced Options
|
# Show/Hide Advanced Options
|
||||||
app_mode = self.app.defaults["global_app_level"]
|
app_mode = self.app.defaults["global_app_level"]
|
||||||
self.change_level(app_mode)
|
self.change_level(app_mode)
|
||||||
@@ -403,6 +403,25 @@ class GeometryObject(FlatCAMObj, Geometry):
|
|||||||
def on_row_changed(self):
|
def on_row_changed(self):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
def table_toggle_all(self):
|
||||||
|
"""
|
||||||
|
Will toggle the selection of all rows in the table
|
||||||
|
|
||||||
|
:return:
|
||||||
|
"""
|
||||||
|
sel_model = self.ui.geo_tools_table.selectionModel()
|
||||||
|
sel_indexes = sel_model.selectedIndexes()
|
||||||
|
|
||||||
|
# it will iterate over all indexes which means all items in all columns too but I'm interested only on rows
|
||||||
|
sel_rows = set()
|
||||||
|
for idx in sel_indexes:
|
||||||
|
sel_rows.add(idx.row())
|
||||||
|
|
||||||
|
if sel_rows:
|
||||||
|
self.ui.geo_tools_table.clearSelection()
|
||||||
|
else:
|
||||||
|
self.ui.geo_tools_table.selectAll()
|
||||||
|
|
||||||
def set_offset_values(self):
|
def set_offset_values(self):
|
||||||
xmin, ymin, xmax, ymax = self.bounds()
|
xmin, ymin, xmax, ymax = self.bounds()
|
||||||
center_coords = (
|
center_coords = (
|
||||||
|
|||||||
Reference in New Issue
Block a user