Commit 57983477 authored by Michael Büsch's avatar Michael Büsch

gui: Re-upload mem-areas on state window close

Signed-off-by: Michael Büsch's avatarMichael Buesch <m@bues.ch>
parent 98bb7f9e
......@@ -903,5 +903,16 @@ class State_Counter(_State_TimerCounter):
return text
class StateMdiArea(QMdiArea):
def __init__(self, parent=None):
QMdiArea.__init__(self, parent)
pass
class StateMdiSubWindow(QMdiSubWindow):
closed = Signal(QMdiSubWindow)
def __init__(self, parent):
QMdiSubWindow.__init__(self)
self.setWidget(parent)
self.setAttribute(Qt.WA_DeleteOnClose)
def closeEvent(self, ev):
self.closed.emit(self)
QMdiSubWindow.closeEvent(self, ev)
......@@ -215,8 +215,13 @@ class CpuWidget(QWidget):
self.__newWin_CPU()
self.update()
def __stateMdiWindowClosed(self, mdiWin):
QTimer.singleShot(0, self.__uploadMemReadAreas)
def __addWindow(self, win):
self.stateMdi.addSubWindow(win, Qt.Window)
mdiWin = StateMdiSubWindow(win)
mdiWin.closed.connect(self.__stateMdiWindowClosed)
self.stateMdi.addSubWindow(mdiWin, Qt.Window)
win.configChanged.connect(self.__stateWinConfigChanged)
win.show()
self.update()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment