forked from M-Labs/artiq
gui: save/restore geometry of MDI subwindows
This commit is contained in:
parent
aa5f6a5aba
commit
53076615f8
|
@ -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:
|
||||||
|
|
Loading…
Reference in New Issue