qtReferenceItemComboBox ignores own resource if it is associated to model
If you associate a model to an attribute resource, then component items referencing attributes do not display the list of attributes in the qtComponentItem widget.
To reproduce in modelbuilder:
- Load model file, e.g., casting-mesh1.gen
- Load Truchas template (Truchas.sbt)
- (Important) In the Operations panel, use the smtk::attribute::Associate operation to associate the attribute resource to the model.
- Do the remaining steps in the Attribute Editor panel
- In the Analysis tab, enable the Heat Transfer checkbox
- In the Materials -> Phases tab, create a Phase attribute
- In the Materials -> Phase Transitions tab, create a Phase Transition attribute.
- In the Phase Transition data, the Low-Temperature phase and High-Temperature Phase items display empty combo boxes. They each should display the phase attribute created in step 6.
The underlying issue is in qtReferenceItemComboBox::associatableObjects(). If the attribute resource has associations, then only those associated resources are used.
One workaround is to associate the attribute resource with itself, but perhaps we should consider extending the component item filtering to add "self" as a resource.