Manually updating ComponentItem will not trigger UI update

Hi smtk developers,

I got a question regarding the ComponentItem and its qt representation. My use case is that the input for my operator is an AssociationDef item and a ComponentItem. When user has selected something in AssociationDef. the operator view should automatically populate the ComponentItem.

Ex. A user has selected a nulcear assembly so the operator view will read the associated duct from the assembly and populate it in the ComponentItem. I’m using the following code to monitor attribute changes.

QObject::connect(this->Internals->CurrentAtt, &qtAttribute::itemModified, this,

XML code is shown below.

      <AssociationsDef Name="model/assembly" NumberOfRequiredValues="1" AdvanceLevel="0">
          <Resource Name="smtk::session::rgg::Resource" Filter="model"/>
          <Resource Name="smtk::model::Resource"
                    Filter="group [ string { 'selectable' = '_rgg_assembly' } ]"/>
        <Component Name="associated duct" label="associated duct" NumberOfRequiredValues="1" AdvanceLevel="0">
          <BriefDescription>A duct associated with the nuclear assembly</BriefDescription>
            A json representation for the nuclear assembly. See details in jsonAssembly.h.
            <Resource Name="smtk::model::Resource"
                    Filter="aux_geom [ string { 'selectable' = '_rgg_duct' } ]"/>

The code used to work well and I’ve not touched it since then. However starting from some time the ComponentItem is out of sync. Though the value is set in the ComponentItem, its view is never updated. Any ideas or suggestions on what smtk change might break this behavior?


Privacy Notice