- make sure that the state of the workspace is saved correctly on change

This commit is contained in:
Marius Stanciu
2022-03-31 11:40:50 +03:00
committed by Marius
parent c4151631ec
commit e1824a09f7
4 changed files with 6 additions and 1 deletions

View File

@@ -450,6 +450,7 @@ class PlotCanvas(QtCore.QObject, VisPyCanvas):
background-color: olivedrab;
}
""")
self.fcapp.options['global_workspace'] = True
def delete_workspace(self):
try:
@@ -457,6 +458,7 @@ class PlotCanvas(QtCore.QObject, VisPyCanvas):
except Exception:
pass
self.fcapp.ui.wplace_label.setStyleSheet("")
self.fcapp.options['global_workspace'] = False
# redraw the workspace lines on the plot by re adding them to the parent view.scene
def restore_workspace(self):

View File

@@ -581,6 +581,7 @@ class PlotCanvasLegacy(QtCore.QObject):
background-color: olivedrab;
}
""")
self.app.options['global_workspace'] = True
def delete_workspace(self):
try:
@@ -589,6 +590,7 @@ class PlotCanvasLegacy(QtCore.QObject):
except Exception:
pass
self.app.ui.wplace_label.setStyleSheet("")
self.app.options['global_workspace'] = False
def graph_event_connect(self, event_name, callback):
"""