- made the visibility change (when using the Spacebar key in Project Tab) to be not threaded and to use the enabled property of the ShapesCollection which should be faster

This commit is contained in:
Marius Stanciu
2020-05-28 01:54:33 +03:00
committed by Marius
parent 90eb581a34
commit b106081311
3 changed files with 20 additions and 17 deletions

View File

@@ -459,20 +459,15 @@ class FlatCAMObj(QtCore.QObject):
def visible(self, value, threaded=True):
log.debug("FlatCAMObj.visible()")
def worker_task(app_obj):
self.shapes.visible = value
# self.shapes.visible = value # maybe this is slower in VisPy
self.shapes.enabled = value
if self.app.is_legacy is False:
# Not all object types has annotations
try:
self.annotation.visible = value
except Exception:
pass
if threaded is False:
worker_task(app_obj=self.app)
else:
self.app.worker_task.emit({'fcn': worker_task, 'params': [self]})
if self.app.is_legacy is False:
# Not all object types has annotations
try:
self.annotation.visible = value
except Exception:
pass
@property
def drawing_tolerance(self):