mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-25 03:40:40 +00:00
Fix enchanted item icon update
This commit is contained in:
parent
79fca2e7c6
commit
2f38e4fbb3
@ -156,12 +156,19 @@ namespace MWGui
|
|||||||
|
|
||||||
void SpellWidget::setSpellIcon(const std::string& icon)
|
void SpellWidget::setSpellIcon(const std::string& icon)
|
||||||
{
|
{
|
||||||
if (mFrame)
|
if (mFrame && !mCurrentFrame.empty())
|
||||||
|
{
|
||||||
|
mCurrentFrame.clear();
|
||||||
mFrame->setImageTexture("");
|
mFrame->setImageTexture("");
|
||||||
|
}
|
||||||
|
if (mCurrentIcon != icon)
|
||||||
|
{
|
||||||
|
mCurrentIcon = icon;
|
||||||
if (mItemShadow)
|
if (mItemShadow)
|
||||||
mItemShadow->setImageTexture(icon);
|
mItemShadow->setImageTexture(icon);
|
||||||
if (mItem)
|
if (mItem)
|
||||||
mItem->setImageTexture(icon);
|
mItem->setImageTexture(icon);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user