Markups saved with Scalar Visibility ON produce warning when loading


Let’s suppose in Markups module we have set Active Scalars (PedigreeId for example) and Scalar Visibility to ON.
Then we save the scene.
Finally we load the scene and we can see the following warning:

[VTK] Warning: In /work/Preview/Slicer-0/Modules/Loadable/Markups/MRML/vtkMRMLMarkupsDisplayNode.cxx, line 926
[VTK] vtkMRMLMarkupsDisplayNode (0x66db9d0): UpdateAssignedAttribute() failed: assign markupsNode before calling this method.

Somewhere at loading step we are trying to call vtkMRMLMarkupsDisplayNode::SetScalarVisibility before Markups Node is set.

As a result Markups is not colored after the loading.

Slicer 5.3.0-2023-03-16 r31679 / 106cff2