From 7b155f111daf5d7ae477b16d0f0789b1113bea74 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 6 Jun 2012 00:04:33 +0300 Subject: Fix some issues after auto checking. --- src/gui/widgets/itemcontainer.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src/gui/widgets/itemcontainer.cpp') diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp index c46131379..5994b1e1a 100644 --- a/src/gui/widgets/itemcontainer.cpp +++ b/src/gui/widgets/itemcontainer.cpp @@ -61,10 +61,9 @@ static const int BOX_HEIGHT = 43; class ItemIdPair { public: - ItemIdPair(int id, Item* item) + ItemIdPair(int id, Item* item) : + mId(id), mItem(item) { - mId = id; - mItem = item; } int mId; @@ -166,18 +165,17 @@ ItemContainer::ItemContainer(Inventory *inventory, bool forceQuantity): mDescItems(false), mTag(0), mSortType(0), - mShowMatrix(nullptr) + mItemPopup(new ItemPopup), + mShowMatrix(nullptr), + mEquipedColor(Theme::getThemeColor(Theme::ITEM_EQUIPPED)), + mUnEquipedColor(Theme::getThemeColor(Theme::ITEM_NOT_EQUIPPED)) { - mItemPopup = new ItemPopup; setFocusable(true); mSelImg = Theme::getImageFromTheme("selection.png"); if (!mSelImg) logger->log1("Error: Unable to load selection.png"); - mEquipedColor = Theme::getThemeColor(Theme::ITEM_EQUIPPED); - mUnEquipedColor = Theme::getThemeColor(Theme::ITEM_NOT_EQUIPPED); - addKeyListener(this); addMouseListener(this); addWidgetListener(this); -- cgit v1.2.3-70-g09d2