- fixed a bug introduced by first mod today, when the selected object is of 'cncjob' kind.

This commit is contained in:
Marius Stanciu
2020-12-04 16:47:58 +02:00
committed by Marius Stanciu
parent e677a6592e
commit b023b79822
7 changed files with 16 additions and 13 deletions

View File

@@ -11,6 +11,7 @@ CHANGELOG for FlatCAM beta
- in Cutout, 2Sided, Film, NCC, Paint, Panelize and Subtract Tool made sure that the object selection in Project Tab reflects in the selected object in the Tools - in Cutout, 2Sided, Film, NCC, Paint, Panelize and Subtract Tool made sure that the object selection in Project Tab reflects in the selected object in the Tools
- set the shortcut key for Milling Tool to ALt+M and for Corner Markers Tool to Alt+B - set the shortcut key for Milling Tool to ALt+M and for Corner Markers Tool to Alt+B
- fixed a bug introduced by first mod today, when the selected object is of 'cncjob' kind.
3.12.2020 3.12.2020

View File

@@ -177,12 +177,13 @@ class DblSidedTool(AppTool):
name = current.indexes()[0].internalPointer().obj.options['name'] name = current.indexes()[0].internalPointer().obj.options['name']
kind = current.indexes()[0].internalPointer().obj.kind kind = current.indexes()[0].internalPointer().obj.kind
obj_type = {'gerber': 'grb', 'excellon': 'exc', 'geometry': 'geo'}[kind] if kind in ['gerber', 'excellon', 'geometry']:
self.ui.object_type_radio.set_value(obj_type) obj_type = {'gerber': 'grb', 'excellon': 'exc', 'geometry': 'geo'}[kind]
self.ui.box_type_radio.set_value(obj_type) self.ui.object_type_radio.set_value(obj_type)
self.ui.box_type_radio.set_value(obj_type)
self.ui.object_combo.set_value(name) self.ui.object_combo.set_value(name)
except IndexError: except Exception:
pass pass
def on_create_alignment_holes(self): def on_create_alignment_holes(self):

View File

@@ -100,7 +100,7 @@ class Film(AppTool):
self.ui.tf_object_combo.set_value(name) self.ui.tf_object_combo.set_value(name)
self.ui.tf_box_combo.set_value(name) self.ui.tf_box_combo.set_value(name)
except IndexError: except Exception:
pass pass
def run(self, toggle=True): def run(self, toggle=True):

View File

@@ -280,7 +280,7 @@ class NonCopperClear(AppTool, Gerber):
self.ui.type_obj_radio.set_value(kind) self.ui.type_obj_radio.set_value(kind)
self.ui.object_combo.set_value(name) self.ui.object_combo.set_value(name)
except IndexError: except Exception:
pass pass
def on_toggle_all_rows(self): def on_toggle_all_rows(self):

View File

@@ -292,7 +292,7 @@ class ToolPaint(AppTool, Gerber):
self.ui.type_obj_radio.set_value(kind) self.ui.type_obj_radio.set_value(kind)
self.ui.obj_combo.set_value(name) self.ui.obj_combo.set_value(name)
except IndexError: except Exception:
pass pass
def update_ui(self): def update_ui(self):

View File

@@ -204,9 +204,10 @@ class Panelize(AppTool):
name = current.indexes()[0].internalPointer().obj.options['name'] name = current.indexes()[0].internalPointer().obj.options['name']
kind = current.indexes()[0].internalPointer().obj.kind kind = current.indexes()[0].internalPointer().obj.kind
obj_type = { if kind in ['gerber', 'excellon', 'geometry']:
"gerber": _("Gerber"), "excellon": _("Excellon"), "geometry": _("Geometry") obj_type = {
}[kind] "gerber": _("Gerber"), "excellon": _("Excellon"), "geometry": _("Geometry")
}[kind]
self.ui.type_obj_combo.set_value(obj_type) self.ui.type_obj_combo.set_value(obj_type)
self.ui.type_box_combo.set_value(obj_type) self.ui.type_box_combo.set_value(obj_type)
@@ -216,7 +217,7 @@ class Panelize(AppTool):
self.ui.object_combo.set_value(name) self.ui.object_combo.set_value(name)
self.ui.box_combo.set_value(name) self.ui.box_combo.set_value(name)
except IndexError: except Exception:
pass pass
def on_panelize(self): def on_panelize(self):

View File

@@ -173,7 +173,7 @@ class ToolSub(AppTool):
self.ui.target_gerber_combo.set_value(name) self.ui.target_gerber_combo.set_value(name)
if kind == 'geometry': if kind == 'geometry':
self.ui.target_geo_combo.set_value(name) self.ui.target_geo_combo.set_value(name)
except IndexError: except Exception:
pass pass
def set_tool_ui(self): def set_tool_ui(self):