- 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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user