SimpleMarkupsWidget in custom python module not calling updateParameterNodeFromGUI()

In my Python Scripted Module I have an instance of a SimpleMarkupsWidget.

When I change the selected Point List (as depicted in the screenshot below) updateParameterNodeFromGUI() is not called:

I already read in Slicer Scripted Module not calling updateParameterNodeFromGUI when UI is updated that I have “connect each GUI element with the callback to updateParameterNodeFromGUI”, so I added this to setup():

self.ui.SimpleMarkupsWidget.connect("currentNodeChanged(vtkMRMLNode*)", self.updateParameterNodeFromGUI)

but this did not solve the problem.

What am I missing? Does changing the Point List not trigger currentNodeChanged()?

qSlicerSimpleMarkupsWidget is not related to parameter nodes, so I’m not sure what updateParameterNodeFromGUI signal you expect it to emit. You can find what signals this widget emits in its documentation.

1 Like

Thanks! I wanted to get the currently selected node, I managed to do this by connecting markupsFiducialNodeChanged (which I found in the documentation you linked) like so:

self.ui.SimpleMarkupsWidget.connect("markupsFiducialNodeChanged()", self.foo)