forked from mirror/openmw-tes3mp
Add InventoryWindow::clear() as part of world cleanup
This commit is contained in:
parent
50f3794d12
commit
30081393a6
3 changed files with 22 additions and 7 deletions
|
@ -136,6 +136,18 @@ namespace MWGui
|
|||
dirtyPreview();
|
||||
|
||||
updatePreviewSize();
|
||||
|
||||
updateEncumbranceBar();
|
||||
mItemView->update();
|
||||
notifyContentChanged();
|
||||
}
|
||||
|
||||
void InventoryWindow::clear()
|
||||
{
|
||||
mPtr = MWWorld::Ptr();
|
||||
mTradeModel = NULL;
|
||||
mSortModel = NULL;
|
||||
mItemView->setModel(NULL);
|
||||
}
|
||||
|
||||
void InventoryWindow::setGuiMode(GuiMode mode)
|
||||
|
@ -340,13 +352,12 @@ namespace MWGui
|
|||
|
||||
void InventoryWindow::open()
|
||||
{
|
||||
mPtr = MWMechanics::getPlayer();
|
||||
|
||||
if (!mPtr.isEmpty())
|
||||
{
|
||||
updateEncumbranceBar();
|
||||
|
||||
mItemView->update();
|
||||
|
||||
notifyContentChanged();
|
||||
}
|
||||
adjustPanes();
|
||||
}
|
||||
|
||||
|
|
|
@ -60,6 +60,8 @@ namespace MWGui
|
|||
|
||||
void updatePlayer();
|
||||
|
||||
void clear();
|
||||
|
||||
void useItem(const MWWorld::Ptr& ptr);
|
||||
|
||||
void setGuiMode(GuiMode mode);
|
||||
|
|
|
@ -1696,6 +1696,8 @@ namespace MWGui
|
|||
mCompanionWindow->resetReference();
|
||||
mConsole->resetReference();
|
||||
|
||||
mInventoryWindow->clear();
|
||||
|
||||
mSelectedSpell.clear();
|
||||
|
||||
mCustomMarkers.clear();
|
||||
|
|
Loading…
Reference in a new issue