- Gerber UI - optimized the mark shapes to use only on ShapeCollection

This commit is contained in:
Marius Stanciu
2020-07-12 01:36:21 +03:00
committed by Marius
parent eee56a8f2f
commit 329bb04b3c
5 changed files with 50 additions and 66 deletions

View File

@@ -147,6 +147,12 @@ class ShapeGroup(object):
"""
self._indexes.append(self._collection.add(**kwargs))
def remove(self, idx, update=False):
self._indexes.remove(idx)
self._collection.remove(idx, False)
if update:
self._collection.redraw([]) # Skip waiting results
def clear(self, update=False):
"""
Removes group shapes from collection, clear indexes
@@ -667,7 +673,7 @@ class TextCollectionVisual(TextVisual):
def clear(self, update=False):
"""
Removes all shapes from colleciton
Removes all shapes from collection
:param update: bool
Set True to redraw collection
"""