- fixing an issue with not building the UI for the generated objects when running a script and then trying to enable/disable the plots

- attempting to add a feature in the text editors to autoselect all words in a document that are the same as the one that was clicked
- all the colors set in Preferences now have to be in the 8digits format RGBA (including the alpha channel as a suffix) - it is required to delete the current preferences files
This commit is contained in:
Marius Stanciu
2022-01-17 21:26:10 +02:00
committed by Marius
parent fd696b00a2
commit 2430158334
11 changed files with 117 additions and 44 deletions

View File

@@ -3673,7 +3673,7 @@ class AppExcEditor(QtCore.QObject):
for sub_geo in el.geoms:
self.tool_shape.add(
shape=sub_geo,
color=(self.app.defaults["global_draw_color"] + '80'),
color=(self.app.defaults["global_draw_color"]),
update=False,
layer=0,
tolerance=None
@@ -3681,14 +3681,14 @@ class AppExcEditor(QtCore.QObject):
else:
self.tool_shape.add(
shape=el,
color=(self.app.defaults["global_draw_color"] + '80'),
color=(self.app.defaults["global_draw_color"]),
update=False,
layer=0,
tolerance=None)
except TypeError:
self.tool_shape.add(
shape=util_geo,
color=(self.app.defaults["global_draw_color"] + '80'),
color=(self.app.defaults["global_draw_color"]),
update=False,
layer=0,
tolerance=None)
@@ -3717,7 +3717,7 @@ class AppExcEditor(QtCore.QObject):
self.plot_shape(geometry=shape_plus.geo, color=self.app.defaults['global_sel_draw_color'] + 'FF',
linewidth=2)
continue
self.plot_shape(geometry=shape_plus.geo, color=self.app.defaults['global_draw_color'] + 'FF')
self.plot_shape(geometry=shape_plus.geo, color=self.app.defaults['global_draw_color'][:-2] + 'FF')
for shape_form in self.utility:
self.plot_shape(geometry=shape_form.geo, linewidth=1)

View File

@@ -4975,7 +4975,7 @@ class AppGeoEditor(QtCore.QObject):
for poly in el:
self.tool_shape.add(
shape=poly,
color=(self.app.defaults["global_draw_color"] + '80'),
color=(self.app.defaults["global_draw_color"]),
update=False,
layer=0,
tolerance=None
@@ -4984,7 +4984,7 @@ class AppGeoEditor(QtCore.QObject):
for linestring in el:
self.tool_shape.add(
shape=linestring,
color=(self.app.defaults["global_draw_color"] + '80'),
color=(self.app.defaults["global_draw_color"]),
update=False,
layer=0,
tolerance=None
@@ -4992,14 +4992,14 @@ class AppGeoEditor(QtCore.QObject):
else:
self.tool_shape.add(
shape=el,
color=(self.app.defaults["global_draw_color"] + '80'),
color=(self.app.defaults["global_draw_color"]),
update=False,
layer=0,
tolerance=None
)
except TypeError:
self.tool_shape.add(
shape=geo.geo, color=(self.app.defaults["global_draw_color"] + '80'),
shape=geo.geo, color=(self.app.defaults["global_draw_color"]),
update=False, layer=0, tolerance=None)
self.tool_shape.redraw()
@@ -5118,8 +5118,8 @@ class AppGeoEditor(QtCore.QObject):
self.shapes.clear(update=True)
draw_color = self.app.defaults['global_draw_color'] + "FF"
sel_color = self.app.defaults['global_sel_draw_color'] + 'FF'
draw_color = self.app.defaults['global_draw_color'][:-2] + "FF"
sel_color = self.app.defaults['global_sel_draw_color'][:-2] + 'FF'
for shape in self.storage.get_objects():
if shape.geo and not shape.geo.is_empty and shape.geo.is_valid:

View File

@@ -5516,7 +5516,7 @@ class AppGerberEditor(QtCore.QObject):
geometric_data = el['solid']
# Add the new utility shape
self.tool_shape.add(
shape=geometric_data, color=(self.app.defaults["global_draw_color"] + '80'),
shape=geometric_data, color=(self.app.defaults["global_draw_color"]),
# face_color=self.app.defaults['global_alt_sel_fill'],
update=False, layer=0, tolerance=None
)
@@ -5525,7 +5525,7 @@ class AppGerberEditor(QtCore.QObject):
# Add the new utility shape
self.tool_shape.add(
shape=geometric_data,
color=(self.app.defaults["global_draw_color"] + '80'),
color=(self.app.defaults["global_draw_color"]),
# face_color=self.app.defaults['global_alt_sel_fill'],
update=False, layer=0, tolerance=None
)
@@ -5557,7 +5557,7 @@ class AppGerberEditor(QtCore.QObject):
linewidth=2)
else:
self.plot_shape(geometry=geometric_data,
color=self.app.defaults['global_draw_color'] + 'FF')
color=self.app.defaults['global_draw_color'][:-2] + 'FF')
if self.utility:
for elem in self.utility: