Nested optional items not being initialized correctly
This problem occurs in the Qt UI when
- There is an optional group view with the default state set to false.
- The group contains an optional item with the default state of true.
To reproduce:
- Load the attached template file into modelbuilder (you can use qtAttributePreview instead).
- Enable the "Submit job to NERSC" group.
- Note that the nested "AppendJobNameFolder" is unchecked, even though its definition sets isEnabledByDefault="true". This is because Item::isEnabled() returns false if its owning item is not enabled.
So at this point, the UI displays the nested item as disabled, even though the item is enabled. To see this, you can:
- Save the attribute resource (.smtk file).
- Close the resource.
- Open the smtk file. You can see that the AppendJobNameFolder is now checked. This is the opposite of what was displayed when the resource was saved.