- fixed a bug in the FlatCAMGerber.on_mark_cb_click_table() method when moving a Gerber object

- added a way to remember the colors set for the Gerber objects; it will remember the order that they were loaded and set a color previously given
This commit is contained in:
Marius Stanciu
2020-07-20 19:21:17 +03:00
committed by Marius
parent 8409c74e23
commit ebdb2b3ca0
6 changed files with 135 additions and 4 deletions

View File

@@ -10127,6 +10127,19 @@ class App(QtCore.QObject):
update_colors=(new_color, new_line_color)
)
# make sure to set the color in the Gerber colors storage self.defaults["gerber_color_list"]
group = self.collection.group_items["gerber"]
group_index = self.collection.index(group.row(), 0, QtCore.QModelIndex())
new_c = (new_color, new_line_color)
for sel_obj in sel_obj_list:
if sel_obj.kind == 'gerber':
item = sel_obj.item
item_index = self.collection.index(item.row(), 0, group_index)
idx = item_index.row()
self.defaults["gerber_color_list"][idx] = new_c
def generate_cnc_job(self, objects):
"""
Slot that will be called by clicking an entry in the contextual menu generated in the Project Tab tree