Commit 4aebabf7 authored by David Thompson's avatar David Thompson

Do not hold QItemWidgets beyond death.

Also, initialize `lastHighlightedItem` properly.
parent 99abdcaa
......@@ -63,6 +63,10 @@ using namespace smtk::extension;
class qtAssociationWidgetInternals : public Ui::qtAttributeAssociation
{
public:
qtAssociationWidgetInternals()
: lastHighlightedItem(nullptr)
{
}
WeakAttributePtr currentAtt;
QPointer<qtBaseView> view;
QListWidgetItem* lastHighlightedItem;
......@@ -638,6 +642,7 @@ void qtAssociationWidget::resetHover()
if (this->Internals->lastHighlightedItem != nullptr)
{
this->Internals->lastHighlightedItem->setBackground(this->Internals->normalBackground);
this->Internals->lastHighlightedItem = nullptr;
}
auto selection = uiManager->selection();
if (selection == nullptr)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment