mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-10 03:39:55 +00:00
added an assert
This commit is contained in:
parent
f8c20ef77f
commit
c5d685c780
@ -239,7 +239,9 @@ void ContainerBase::drawItems()
|
||||
for (std::vector<MWWorld::Ptr>::iterator it=unwantedItems.begin();
|
||||
it != unwantedItems.end(); ++it)
|
||||
{
|
||||
equippedItems.erase(std::find(unwantedItems.begin(), unwantedItems.end(), *it));
|
||||
std::vector<MWWorld::Ptr>::iterator found = std::find(unwantedItems.begin(), unwantedItems.end(), *it);
|
||||
assert(found != unwantedItems.end());
|
||||
equippedItems.erase(found);
|
||||
}
|
||||
// and add the items that are left (= have the correct category)
|
||||
for (std::vector<MWWorld::Ptr>::const_iterator it=equippedItems.begin();
|
||||
@ -266,7 +268,7 @@ void ContainerBase::drawItems()
|
||||
if (mDragAndDrop->mIsOnDragAndDrop && *iter == *mDragAndDrop->mDraggedWidget->getUserData<MWWorld::Ptr>())
|
||||
{
|
||||
displayCount -= mDragAndDrop->mDraggedCount;
|
||||
}
|
||||
}
|
||||
if(displayCount > 0 && !(onlyMagic && MWWorld::Class::get(*iter).getEnchantment(*iter) == "" && iter->getTypeName() != typeid(ESM::Potion).name()))
|
||||
{
|
||||
std::string path = std::string("icons\\");
|
||||
|
@ -209,6 +209,7 @@ namespace MWGui
|
||||
|
||||
if (invStore.getSlot(*slot) == invStore.end())
|
||||
{
|
||||
// slot is not occupied
|
||||
invStore.equip(*slot, it);
|
||||
break;
|
||||
}
|
||||
|
@ -151,6 +151,8 @@ WindowManager::~WindowManager()
|
||||
delete mToolTips;
|
||||
delete mCharGen;
|
||||
delete mDragAndDrop;
|
||||
delete mBookWindow;
|
||||
delete mScrollWindow;
|
||||
|
||||
cleanupGarbage();
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ namespace GUI
|
||||
|
||||
void shutdown()
|
||||
{
|
||||
MyGUI::LayoutManager::getInstance().unloadLayout(mListWindowRoot);
|
||||
MyGUI::Gui::getInstance().destroyWidget(mMainWidget);
|
||||
mListWindowRoot.clear();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user