1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-03 18:15:35 +00:00

Fix enchanted item icon update

This commit is contained in:
Capostrophic 2019-03-02 20:01:42 +03:00
parent 79fca2e7c6
commit 2f38e4fbb3

View file

@ -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);
}
}
}