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

Merge pull request #2202 from Capostrophic/icon

Fix enchanted item icon update
This commit is contained in:
Bret Curtis 2019-03-03 01:03:28 +01:00 committed by GitHub
commit aa513bba29
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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