Open vespos opened 1 month ago
It seems like we should be blocking signals here: https://github.com/slac-lcls/ami/blob/master/ami/client/flowchart.py#L233
Right now that causes a checkpoint to be sent on display, which I dont think we should be doing.
Another issue I found is that custom widgets seem to be sending checkpoints as many times as you open and close the window. The filter widget for example if you open it and close it then change a control in the widget it will emit 2 signals for the state changed. I'm not sure why. I can also reproduce this with the calculator.
I think I know what the bug is. We create the widget in two places. One in the subprocess and one in the Flowchart class. The one in the subprocess is getting updated when we close the window and reopen it, but the one in the Flowchart never does. We probably need to a send a message to the flowchart when the window gets closed to destroy the widget.
Describe the bug When disconnecting a terminal and reconnecting it to another box, the underlying subprocess might not update itself correctly. This seems to be linked to the fact that the Flowchart does not communicate the updated topology to the Node's subprocess. This results in the mapping of the terminal to the internal variables not working properly, and being overwritten.
Solution might involve replicating some of the step in the build_views function of the FlowchartWidget, in particular
self.chart.broker.send_pyobj(fcMsgs.DisplayNode(**args))
For now, deleting the problematic node (typically a filter box) and making a new one does allow one to move past the issue.