Modelbuilder fails to close model resource
To reproduce with modelbuilder:
- Load this model resource test2d-model.smtk
- Load this attribute resource test2d-attributes.smtk
- Select the model resource in the resource panel and then select the "File" => "Close Resource" menu item.
- The model resource should be removed from modelbuilder, but is still there.
- A new message shows up in the Output Messages panel that a
smtk::session::polygon::Read
operation succeeded. So basically the model resource was deleted then read back in.
Note that the attribute resource contains a couple attributes associated to entities in the model resource. The working theory is:
- When the model resource is deleted, an observer on the operation calls
qtAssociation2ColumnWidget::handleResourceEvent()
. - That
handleResourceEvent()
method callsReferenceItem::removeInvalidValues()
. -
ReferenceItem::removeInvalidValues()
calls a method on its attribute linkslinkedObjectInformation()
. - And
smtk::resource::Links::linkedObjectInformation()
invokes a fetch of the model resource.
This is NOT a new problem -- it can be reproduced with the 21.05 release modelbuilder
Edited by John Tourtellott