mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-05-02 14:57:59 +03:00
Merge pull request #2202 from Capostrophic/icon
Fix enchanted item icon update
This commit is contained in:
commit
aa513bba29
1 changed files with 12 additions and 5 deletions
|
@ -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 (mItemShadow)
|
}
|
||||||
mItemShadow->setImageTexture(icon);
|
if (mCurrentIcon != icon)
|
||||||
if (mItem)
|
{
|
||||||
mItem->setImageTexture(icon);
|
mCurrentIcon = icon;
|
||||||
|
if (mItemShadow)
|
||||||
|
mItemShadow->setImageTexture(icon);
|
||||||
|
if (mItem)
|
||||||
|
mItem->setImageTexture(icon);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue