mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-28 07:32:00 -04:00
Fix GUI crash due to outdated spells list
This commit is contained in:
parent
ec00c830e5
commit
0dc9401269
@ -124,6 +124,8 @@ namespace MWGui
|
|||||||
if (targetView)
|
if (targetView)
|
||||||
targetView->update();
|
targetView->update();
|
||||||
|
|
||||||
|
MWBase::Environment::get().getWindowManager()->getInventoryWindow()->updateItemView();
|
||||||
|
|
||||||
// We need to update the view since an other item could be auto-equipped.
|
// We need to update the view since an other item could be auto-equipped.
|
||||||
mSourceView->update();
|
mSourceView->update();
|
||||||
}
|
}
|
||||||
|
@ -309,6 +309,9 @@ namespace MWGui
|
|||||||
|
|
||||||
void InventoryWindow::updateItemView()
|
void InventoryWindow::updateItemView()
|
||||||
{
|
{
|
||||||
|
if (MWBase::Environment::get().getWindowManager()->getSpellWindow())
|
||||||
|
MWBase::Environment::get().getWindowManager()->getSpellWindow()->updateSpells();
|
||||||
|
|
||||||
mItemView->update();
|
mItemView->update();
|
||||||
mPreviewDirty = true;
|
mPreviewDirty = true;
|
||||||
}
|
}
|
||||||
@ -614,6 +617,9 @@ namespace MWGui
|
|||||||
mDragAndDrop->startDrag(i, mSortModel, mTradeModel, mItemView, count);
|
mDragAndDrop->startDrag(i, mSortModel, mTradeModel, mItemView, count);
|
||||||
|
|
||||||
MWBase::Environment::get().getMechanicsManager()->itemTaken(player, newObject, count);
|
MWBase::Environment::get().getMechanicsManager()->itemTaken(player, newObject, count);
|
||||||
|
|
||||||
|
if (MWBase::Environment::get().getWindowManager()->getSpellWindow())
|
||||||
|
MWBase::Environment::get().getWindowManager()->getSpellWindow()->updateSpells();
|
||||||
}
|
}
|
||||||
|
|
||||||
void InventoryWindow::cycle(bool next)
|
void InventoryWindow::cycle(bool next)
|
||||||
|
@ -79,7 +79,8 @@ namespace MWGui
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
assert(it != store.end());
|
if (it == store.end())
|
||||||
|
throw std::runtime_error("can't find selected item");
|
||||||
|
|
||||||
// equip, if it can be equipped and is not already equipped
|
// equip, if it can be equipped and is not already equipped
|
||||||
if (!alreadyEquipped
|
if (!alreadyEquipped
|
||||||
|
Loading…
x
Reference in New Issue
Block a user