Association widget missing
Sometime since April 18, the model association widget disappeared for some situations.
- Load the attached template file test-assoc.sbt
- Go to the "Attribute" tab and create an attribute
- An association widget should appear in the view to select the instanced attribute in the other tab
Before and after screenshots are below:
- The left image (good) is commit b2e56411 (18-Apr-2020)
- The right image (bad) is commit e8796a9a (06-May-2020)
Git bisect was a bit tricky because some commits don't build on my desktop (gcc 5.4), but I am pretty sure the problem occurrs at commit a1cbf4b5 (ENH: Added the ability to di[s]able changing attribute names via UI). My guess is that a line was deleted by accident; regardless, this patch fixes the symptom.
diff --git a/smtk/extension/qt/qtAttributeView.cxx b/smtk/extension/qt/qtAttributeView.cxx
index 829a6d6..81646f3 100644
--- a/smtk/extension/qt/qtAttributeView.cxx
+++ b/smtk/extension/qt/qtAttributeView.cxx
@@ -717,6 +717,7 @@ QTableWidgetItem* qtAttributeView::addAttributeListItem(smtk::attribute::Attribu
Qt::ItemFlags itemFlags(nonEditableFlags | (m_disableNameField ? 0x0 : Qt::ItemIsEditable));
QVariant vdata;
vdata.setValue(static_cast<void*>(childData.get()));
+ item->setData(Qt::UserRole, vdata);
item->setFlags(itemFlags);