Page MenuHomePhabricator

mitk::Mapper needs to be explicitly set
Open, NormalPublic


When working on the crosshair for the MxNMultiWidget we realized that a custom mapper needs to be explicitly set in order to be available for a data node.
This problem already occurred in D759 and was observed again in D779.

A general problem is that calling dataNode->SetData with a new data, which was not equal to the existing data (pointer-wise) will clear the list of available mappers.
Mappers will automatically be reset by CoreObjectFactory::CreateMapper but this seems to have problems (see comments in D779):

I think somehow creating a mapper overwrites another mapper with the same ID, but I need to investigate more (is there a break missing)?

This lead to the problem that the required custom mapper was not available, thus not called and as a consequence no data was drawn.

Event Timeline

kalali triaged this task as Normal priority.Mar 24 2023, 6:29 PM
kalali created this task.