- refactoring all the references to object options property to obj_options to make a difference with the application options property
This commit is contained in:
@@ -3273,7 +3273,7 @@ class MainGUI(QtWidgets.QMainWindow):
|
||||
self.app.collection.set_all_inactive()
|
||||
if active is None:
|
||||
return
|
||||
active_name = active.options['name']
|
||||
active_name = active.obj_options['name']
|
||||
active_index = names_list.index(active_name)
|
||||
if active_index == 0:
|
||||
self.app.collection.set_active(names_list[-1])
|
||||
@@ -3288,7 +3288,7 @@ class MainGUI(QtWidgets.QMainWindow):
|
||||
self.app.collection.set_all_inactive()
|
||||
if active is None:
|
||||
return
|
||||
active_name = active.options['name']
|
||||
active_name = active.obj_options['name']
|
||||
active_index = names_list.index(active_name)
|
||||
if active_index == len(names_list) - 1:
|
||||
self.app.collection.set_active(names_list[0])
|
||||
@@ -3536,7 +3536,7 @@ class MainGUI(QtWidgets.QMainWindow):
|
||||
self.app.ui.grid_snap_btn.trigger()
|
||||
|
||||
# make sure that the cursor shape is enabled/disabled, too
|
||||
if self.app.geo_editor.options['grid_snap'] is True:
|
||||
if self.app.geo_editor.obj_options['grid_snap'] is True:
|
||||
self.app.app_cursor.enabled = True
|
||||
else:
|
||||
self.app.app_cursor.enabled = False
|
||||
@@ -3841,7 +3841,7 @@ class MainGUI(QtWidgets.QMainWindow):
|
||||
if key == QtCore.Qt.Key.Key_G or key == 'G':
|
||||
self.app.grb_editor.launched_from_shortcuts = True
|
||||
# make sure that the cursor shape is enabled/disabled, too
|
||||
if self.app.grb_editor.options['grid_snap'] is True:
|
||||
if self.app.grb_editor.obj_options['grid_snap'] is True:
|
||||
self.app.app_cursor.enabled = False
|
||||
else:
|
||||
self.app.app_cursor.enabled = True
|
||||
@@ -4014,7 +4014,7 @@ class MainGUI(QtWidgets.QMainWindow):
|
||||
if key == QtCore.Qt.Key.Key_G or key == 'G':
|
||||
self.app.exc_editor.launched_from_shortcuts = True
|
||||
# make sure that the cursor shape is enabled/disabled, too
|
||||
if self.app.exc_editor.options['grid_snap'] is True:
|
||||
if self.app.exc_editor.obj_options['grid_snap'] is True:
|
||||
self.app.app_cursor.enabled = False
|
||||
else:
|
||||
self.app.app_cursor.enabled = True
|
||||
|
||||
@@ -1288,7 +1288,7 @@ class ShapeCollectionLegacy:
|
||||
self._linewidth = linewidth
|
||||
|
||||
if name is None:
|
||||
axes_name = self.obj.options['name']
|
||||
axes_name = self.obj.obj_options['name']
|
||||
else:
|
||||
axes_name = name
|
||||
|
||||
@@ -1433,7 +1433,7 @@ class ShapeCollectionLegacy:
|
||||
if local_shapes[element]['visible'] is True:
|
||||
if obj_type == 'excellon':
|
||||
# Plot excellon (All polygons?)
|
||||
if self.obj.options["solid"] and isinstance(local_shapes[element]['shape'], Polygon):
|
||||
if self.obj.obj_options["solid"] and isinstance(local_shapes[element]['shape'], Polygon):
|
||||
try:
|
||||
patch = PolygonPatch(local_shapes[element]['shape'],
|
||||
facecolor=local_shapes[element]['face_color'],
|
||||
@@ -1483,12 +1483,12 @@ class ShapeCollectionLegacy:
|
||||
except Exception as e:
|
||||
self.app.log.error("ShapeCollectionLegacy.redraw() geometry no poly --> %s" % str(e))
|
||||
elif obj_type == 'gerber':
|
||||
if self.obj.options["multicolored"]:
|
||||
if self.obj.obj_options["multicolored"]:
|
||||
linespec = '-'
|
||||
else:
|
||||
linespec = 'k-'
|
||||
|
||||
if self.obj.options["solid"]:
|
||||
if self.obj.obj_options["solid"]:
|
||||
if update_colors:
|
||||
gerber_fill_color = update_colors[0]
|
||||
gerber_outline_color = update_colors[1]
|
||||
|
||||
Reference in New Issue
Block a user