- in Milling Tool - synchronized the Tool Table for Geometry Object with the Geometry UI Table (in Properties)

- in Milling Tool - the Tools Table selection works now as expected (still have to store the changed parameters/update the parameters UI)
- fixed an error in the app that allowed editing of Geometry objects with multiple tools selected and of type MultiGeo; also reverted some changes in case of error in this section
This commit is contained in:
Marius Stanciu
2020-11-13 23:57:43 +02:00
committed by Marius Stanciu
parent 8f9a7fd240
commit 454a697ade
3 changed files with 141 additions and 36 deletions

View File

@@ -2416,6 +2416,7 @@ class App(QtCore.QObject):
pass
else:
self.inform.emit('[WARNING_NOTCL] %s' % _("Select a Geometry, Gerber, Excellon or CNCJob Object to edit."))
self.ui.menuobjects.setDisabled(False)
return
if isinstance(edited_object, GeometryObject):
@@ -2426,16 +2427,22 @@ class App(QtCore.QObject):
# self.ui.splitter.setSizes([0, 1])
if edited_object.multigeo is True:
sel_rows = [item.row() for item in edited_object.ui.geo_tools_table.selectedItems()]
sel_rows = set()
for item in edited_object.ui.geo_tools_table.selectedItems():
sel_rows.add(item.row())
sel_rows = list(sel_rows)
if len(sel_rows) > 1:
self.inform.emit('[WARNING_NOTCL] %s' %
_("Simultaneous editing of tools geometry in a MultiGeo Geometry "
"is not possible.\n"
"Edit only one geometry at a time."))
self.ui.menuobjects.setDisabled(False)
return
if not sel_rows:
self.inform.emit('[WARNING_NOTCL] %s.' % _("No Tool Selected"))
self.ui.menuobjects.setDisabled(False)
return
# determine the tool dia of the selected tool