- in Tools: Paint, NCC and Copper Fill, when using the Area Selection, now the selected aras will stay drawn as markers until the user click RMB

- in legacy2D graphic engine, adding an utility geometry no longer draw the older ones, overwriting them
This commit is contained in:
Marius Stanciu
2019-10-28 15:03:21 +02:00
parent f9ad83ba29
commit b994ee9639
7 changed files with 95 additions and 11 deletions

View File

@@ -272,8 +272,6 @@ class PlotCanvasLegacy(QtCore.QObject):
:return: None
"""
# self.double_click.disconnect(cid)
self.canvas.mpl_disconnect(cid)
def on_new_screen(self):
@@ -936,6 +934,7 @@ class ShapeCollectionLegacy:
:return: None
"""
path_num = 0
local_shapes = deepcopy(self._shapes)
@@ -945,6 +944,10 @@ class ShapeCollectionLegacy:
obj_type = 'utility'
if self._visible:
# if we don't use this then when adding each new shape, the old ones will be added again, too
if obj_type == 'utility':
self.axes.patches.clear()
for element in local_shapes:
if obj_type == 'excellon':
# Plot excellon (All polygons?)
@@ -1040,6 +1043,7 @@ class ShapeCollectionLegacy:
edgecolor=local_shapes[element]['color'],
alpha=local_shapes[element]['alpha'],
zorder=2)
self.axes.add_patch(patch)
except Exception as e:
log.debug("ShapeCollectionLegacy.redraw() --> %s" % str(e))