Ver Fonte

- fixed some bugs related to moving an Gerber object with the aperture table in view

Marius Stanciu há 6 anos atrás
pai
commit
b19047a8b3
2 ficheiros alterados com 11 adições e 3 exclusões
  1. 10 3
      FlatCAMObj.py
  2. 1 0
      README.md

+ 10 - 3
FlatCAMObj.py

@@ -1187,11 +1187,18 @@ class FlatCAMGerber(FlatCAMObj, Gerber):
         self.marked_rows[:] = []
         self.marked_rows[:] = []
 
 
     def on_mark_cb_click_table(self):
     def on_mark_cb_click_table(self):
+        """
+        Will mark aperture geometries on canvas or delete the markings depending on the checkbox state
+        :return:
+        """
+
         self.ui_disconnect()
         self.ui_disconnect()
         cw = self.sender()
         cw = self.sender()
-        cw_index = self.ui.apertures_table.indexAt(cw.pos())
-        cw_row = cw_index.row()
-        check_row = 0
+        try:
+            cw_index = self.ui.apertures_table.indexAt(cw.pos())
+            cw_row = cw_index.row()
+        except AttributeError:
+            cw_row = 0
 
 
         self.marked_rows[:] = []
         self.marked_rows[:] = []
         aperture = self.ui.apertures_table.item(cw_row, 1).text()
         aperture = self.ui.apertures_table.item(cw_row, 1).text()

+ 1 - 0
README.md

@@ -14,6 +14,7 @@ CAD program, and create G-Code for Isolation routing.
 - made units change from shortcut key 'Q' not to affect the preferences
 - made units change from shortcut key 'Q' not to affect the preferences
 - made units change from Edit -> Toggle Units not to affect the preferences
 - made units change from Edit -> Toggle Units not to affect the preferences
 - remade the way the aperture marks are plotted in Gerber Object
 - remade the way the aperture marks are plotted in Gerber Object
+- fixed some bugs related to moving an Gerber object with the aperture table in view
 
 
 5.05.2019
 5.05.2019