forked from M-Labs/artiq
1
0
Fork 0

gui: save/restore geometry of MDI subwindows

This commit is contained in:
Sebastien Bourdeauducq 2016-02-16 00:19:38 +01:00
parent aa5f6a5aba
commit 53076615f8
1 changed files with 6 additions and 2 deletions

View File

@ -299,10 +299,14 @@ class _ExperimentDock(QtWidgets.QMdiSubWindow):
QtWidgets.QMdiSubWindow.closeEvent(self, event) QtWidgets.QMdiSubWindow.closeEvent(self, event)
def save_state(self): def save_state(self):
return self.argeditor.save_state() return {
"args": self.argeditor.save_state(),
"geometry": bytes(self.saveGeometry())
}
def restore_state(self, state): def restore_state(self, state):
self.argeditor.restore_state(state) self.argeditor.restore_state(state["args"])
self.restoreGeometry(QtCore.QByteArray(state["geometry"]))
class ExperimentManager: class ExperimentManager: