From 58b3a3a84e334ad43438db496af958a65f2eb473 Mon Sep 17 00:00:00 2001 From: Nils <> Date: Sat, 25 Apr 2020 19:43:34 +0200 Subject: [PATCH] Notify gui clients when session gets duplicated so they can be recreated in the table --- qtgui/opensessioncontroller.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qtgui/opensessioncontroller.py b/qtgui/opensessioncontroller.py index 5ae82ac..da11aff 100644 --- a/qtgui/opensessioncontroller.py +++ b/qtgui/opensessioncontroller.py @@ -231,13 +231,14 @@ class ClientTable(object): def _reactCallback_clientStatusChanged(self, clientDict:dict): """The major client callback. Maps to nsmd status changes. We will create and delete client tableWidgetItems based on this - """ + """ assert clientDict clientId = clientDict["clientId"] if clientId in ClientItem.allItems: if clientDict["lastStatus"] == "removed": index = self.clientsTreeWidget.indexOfTopLevelItem(ClientItem.allItems[clientId]) self.clientsTreeWidget.takeTopLevelItem(index) + del ClientItem.allItems[clientId] else: ClientItem.allItems[clientId].updateData(clientDict) self._updateClientMenu() #Update here is fine because shutdown sets to status removed. @@ -475,5 +476,5 @@ class OpenSessionController(object): def _reactCallback_sessionOpen(self, nsmSessionExportDict:dict): """Open does not mean we come from the session chooser. Switching does not close a session""" - #self.description.clear() #Deletes the placesholder and text! + #self.description.clear() #Deletes the placesholder and text! self.sessionLoadedPanel.setTitle(nsmSessionExportDict["nsmSessionName"])