Dealing with Items that are Extensible and have number of required values > 0

qtAssociationWdiget has a strange behavior when an Attribute Definition specifies its association requirements as extensible but also with a number of required values > 0. In this case when something is associated with the attribute it can not be disassociate if it will result in the number of things associated being < the number of required values. The core of the issue is that ReferenceItem::removeValue just returns false when this happens.

So I propose that removeValue(i) simply does an unset(i) when i <= number of required values. I’ve implemented this and verified that the GUI works as expected. I’m proposing this is correct behavior based on the current implementation and that maybe all of the extensible item classes should have their removeValue methods behave similarly.


Privacy Notice