- refactored the is_legacy object to use_3d_engine

- made sure that there is no longer a double action when toggling the object visibility ('plot' attribute)
This commit is contained in:
Marius Stanciu
2021-10-31 14:05:00 +02:00
committed by Marius
parent 25bca44996
commit bb089eb657
34 changed files with 321 additions and 366 deletions

View File

@@ -137,6 +137,7 @@ class ShapeGroup(object):
self._collection = collection
self._indexes = []
self._visible = True
self._enabled = True
self._color = None
def add(self, **kwargs):
@@ -198,6 +199,23 @@ class ShapeGroup(object):
self._collection.redraw([])
@property
def enabled(self):
"""
Another way to toggle visibility on canvas
:return:
:rtype:
"""
return self._enabled
@enabled.setter
def enabled(self, value):
"""
Another way to toggle visibility on canvas
:param value: bool
"""
self._collection.enabled = value
def update_visibility(self, state, indexes=None):
if indexes:
for i in indexes: