diff --git a/apps/openmw/mwgui/itemwidget.cpp b/apps/openmw/mwgui/itemwidget.cpp index ba3039a16..5ab69e722 100644 --- a/apps/openmw/mwgui/itemwidget.cpp +++ b/apps/openmw/mwgui/itemwidget.cpp @@ -156,12 +156,19 @@ namespace MWGui void SpellWidget::setSpellIcon(const std::string& icon) { - if (mFrame) + if (mFrame && !mCurrentFrame.empty()) + { + mCurrentFrame.clear(); mFrame->setImageTexture(""); - if (mItemShadow) - mItemShadow->setImageTexture(icon); - if (mItem) - mItem->setImageTexture(icon); + } + if (mCurrentIcon != icon) + { + mCurrentIcon = icon; + if (mItemShadow) + mItemShadow->setImageTexture(icon); + if (mItem) + mItem->setImageTexture(icon); + } } }