Browse Source

- fixed some issues when editing a multigeo geometry

Marius Stanciu 6 năm trước cách đây
mục cha
commit
c7548ee897
2 tập tin đã thay đổi với 6 bổ sung4 xóa
  1. 5 4
      FlatCAMApp.py
  2. 1 0
      README.md

+ 5 - 4
FlatCAMApp.py

@@ -3019,15 +3019,16 @@ class App(QtCore.QObject):
             self.ui.splitter.setSizes([0, 1])
 
             if edited_object.multigeo is True:
-                edited_tools = [int(x.text()) for x in edited_object.ui.geo_tools_table.selectedItems()]
-                if len(edited_tools) > 1:
+                sel_rows = [item.row() for item in edited_object.ui.geo_tools_table.selectedItems()]
+
+                if len(sel_rows) > 1:
                     self.inform.emit('[WARNING_NOTCL] %s' %
-                                     _("Simultanoeus editing of tools geometry in a MultiGeo Geometry "
+                                     _("Simultaneous editing of tools geometry in a MultiGeo Geometry "
                                        "is not possible.\n"
                                        "Edit only one geometry at a time."))
 
                 # determine the tool dia of the selected tool
-                selected_tooldia = float(edited_object.ui.geo_tools_table.item((edited_tools[0] - 1), 1).text())
+                selected_tooldia = float(edited_object.ui.geo_tools_table.item(sel_rows[0], 1).text())
 
                 # now find the key in the edited_object.tools that has this tooldia
                 multi_tool = 1

+ 1 - 0
README.md

@@ -12,6 +12,7 @@ CAD program, and create G-Code for Isolation routing.
 5.11.2019
 
 - added a new setting named 'Allow Machinist Unsafe Settings' that will allow the Travel Z and Cut Z to take both positive and negative values
+- fixed some issues when editing a multigeo geometry
 
 4.11.2019