From 186ec8c50fa205ae731031934589091d3f96c3b0 Mon Sep 17 00:00:00 2001 From: Finbar Crago Date: Tue, 26 Jun 2018 13:35:04 +1000 Subject: [PATCH] rm ContainerStore/refItem --- apps/openmw/mwgui/quickkeysmenu.cpp | 11 +---------- apps/openmw/mwgui/quickkeysmenu.hpp | 6 ++---- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/apps/openmw/mwgui/quickkeysmenu.cpp b/apps/openmw/mwgui/quickkeysmenu.cpp index 7d3e2cbc7..e19df2bbb 100644 --- a/apps/openmw/mwgui/quickkeysmenu.cpp +++ b/apps/openmw/mwgui/quickkeysmenu.cpp @@ -127,13 +127,6 @@ namespace MWGui void QuickKeysMenu::unassign(ItemWidget* key, int index) { - // cleanup refrance ItemContainer - if( mAssigned[index] == Type_Item || mAssigned[index] == Type_MagicItem) - { - MWWorld::Ptr refItem = *key->getUserData(); - mRefItemContainer.remove(refItem.getCellRef().getRefId(), 1, MWMechanics::getPlayer()); - } - mAssignedName[index] = ""; mAssignedId[index] = ""; @@ -236,9 +229,7 @@ namespace MWGui mAssignedId[mSelectedIndex] = item.getCellRef().getRefId(); mAssignedName[mSelectedIndex] = item.getClass().getName(item); - MWWorld::Ptr refItem = *mRefItemContainer.add(item, 1, MWMechanics::getPlayer()); - - button->setItem(refItem, ItemWidget::Barter); + button->setItem(item, ItemWidget::Barter); button->setUserString ("ToolTipType", "ItemPtr"); button->setUserData(item); diff --git a/apps/openmw/mwgui/quickkeysmenu.hpp b/apps/openmw/mwgui/quickkeysmenu.hpp index 8df0ae239..29506ab58 100644 --- a/apps/openmw/mwgui/quickkeysmenu.hpp +++ b/apps/openmw/mwgui/quickkeysmenu.hpp @@ -59,12 +59,10 @@ namespace MWGui MyGUI::EditBox* mInstructionLabel; MyGUI::Button* mOkButton; - MWWorld::ContainerStore mRefItemContainer; - std::vector mAssignedId; - std::vector mAssignedName; - std::vector mQuickKeyButtons; std::vector mAssigned; + std::vector mAssignedId; + std::vector mAssignedName; QuickKeysMenuAssign* mAssignDialog; ItemSelectionDialog* mItemSelectionDialog;