Browse Source

Notify gui clients when session gets duplicated so they can be recreated in the table

master
Nils 4 years ago
parent
commit
58b3a3a84e
  1. 5
      qtgui/opensessioncontroller.py

5
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"])

Loading…
Cancel
Save