- remade visibility as threaded - it seems that I can't really squeeze more performance from this
This commit is contained in:
parent
1b8dd5c76d
commit
6b247ff5e1
|
@ -2495,6 +2495,7 @@ class MainGUI(QtWidgets.QMainWindow):
|
||||||
if key == QtCore.Qt.Key_Space:
|
if key == QtCore.Qt.Key_Space:
|
||||||
for select in selected:
|
for select in selected:
|
||||||
select.ui.plot_cb.toggle()
|
select.ui.plot_cb.toggle()
|
||||||
|
QtWidgets.QApplication.processEvents()
|
||||||
self.app.collection.update_view()
|
self.app.collection.update_view()
|
||||||
self.app.delete_selection_shape()
|
self.app.delete_selection_shape()
|
||||||
|
|
||||||
|
|
|
@ -464,20 +464,28 @@ class FlatCAMObj(QtCore.QObject):
|
||||||
def visible(self, value, threaded=True):
|
def visible(self, value, threaded=True):
|
||||||
log.debug("FlatCAMObj.visible()")
|
log.debug("FlatCAMObj.visible()")
|
||||||
|
|
||||||
|
current_visibility = self.shapes.visible
|
||||||
# self.shapes.visible = value # maybe this is slower in VisPy? use enabled property?
|
# self.shapes.visible = value # maybe this is slower in VisPy? use enabled property?
|
||||||
if self.shapes.visible is True:
|
|
||||||
if value is False:
|
|
||||||
self.shapes.visible = False
|
|
||||||
else:
|
|
||||||
if value is True:
|
|
||||||
self.shapes.visible = True
|
|
||||||
|
|
||||||
if self.app.is_legacy is False:
|
def task(current_visibility):
|
||||||
# Not all object types has annotations
|
if current_visibility is True:
|
||||||
try:
|
if value is False:
|
||||||
self.annotation.visible = value
|
self.shapes.visible = False
|
||||||
except Exception:
|
else:
|
||||||
pass
|
if value is True:
|
||||||
|
self.shapes.visible = True
|
||||||
|
|
||||||
|
if self.app.is_legacy is False:
|
||||||
|
# Not all object types has annotations
|
||||||
|
try:
|
||||||
|
self.annotation.visible = value
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
|
|
||||||
|
if threaded:
|
||||||
|
self.app.worker_task.emit({'fcn': task, 'params': [current_visibility]})
|
||||||
|
else:
|
||||||
|
task(current_visibility)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def drawing_tolerance(self):
|
def drawing_tolerance(self):
|
||||||
|
|
|
@ -31,6 +31,7 @@ CHANGELOG for FlatCAM beta
|
||||||
- added a label in status bar that will toggle the Preferences tab
|
- added a label in status bar that will toggle the Preferences tab
|
||||||
- made some changes such that that the label in status bar for toggling the Preferences Tab will be updated in various cases of closing the tab
|
- made some changes such that that the label in status bar for toggling the Preferences Tab will be updated in various cases of closing the tab
|
||||||
- changed colors for the status bar labels and added some of the new icons in the gray version
|
- changed colors for the status bar labels and added some of the new icons in the gray version
|
||||||
|
- remade visibility as threaded - it seems that I can't really squeeze more performance from this
|
||||||
|
|
||||||
31.05.2020
|
31.05.2020
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue