summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/itemcontainer.cpp15
-rw-r--r--src/gui/widgets/itemcontainer.h1
2 files changed, 6 insertions, 10 deletions
diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp
index 3842daf17..27c640df5 100644
--- a/src/gui/widgets/itemcontainer.cpp
+++ b/src/gui/widgets/itemcontainer.cpp
@@ -172,7 +172,6 @@ ItemContainer::ItemContainer(const Widget2 *const widget,
mSelImg(Theme::getImageFromThemeXml("item_selection.xml", "")),
mProtectedImg(Theme::getImageFromTheme("lock.png")),
mName(),
- mItemPopup(new ItemPopup),
mShowMatrix(nullptr),
mSkin(theme ? theme->load("itemcontainer.xml", "") : nullptr),
mEquipedColor(getThemeColor(Theme::ITEM_EQUIPPED)),
@@ -197,7 +196,6 @@ ItemContainer::ItemContainer(const Widget2 *const widget,
mForceQuantity(forceQuantity),
mDescItems(false)
{
- mItemPopup->postInit();
setFocusable(true);
addKeyListener(this);
addMouseListener(this);
@@ -224,7 +222,6 @@ ItemContainer::~ItemContainer()
if (theme)
theme->unload(mSkin);
- delete2(mItemPopup);
delete []mShowMatrix;
}
@@ -386,8 +383,8 @@ void ItemContainer::distributeValueChangedEvent()
void ItemContainer::hidePopup()
{
- if (mItemPopup)
- mItemPopup->setVisible(false);
+ if (itemPopup)
+ itemPopup->setVisible(false);
}
void ItemContainer::keyPressed(KeyEvent &event A_UNUSED)
@@ -609,18 +606,18 @@ void ItemContainer::mouseMoved(MouseEvent &event)
if (item && viewport)
{
- mItemPopup->setItem(item);
- mItemPopup->position(viewport->getMouseX(), viewport->getMouseY());
+ itemPopup->setItem(item);
+ itemPopup->position(viewport->getMouseX(), viewport->getMouseY());
}
else
{
- mItemPopup->setVisible(false);
+ itemPopup->setVisible(false);
}
}
void ItemContainer::mouseExited(MouseEvent &event A_UNUSED)
{
- mItemPopup->setVisible(false);
+ itemPopup->setVisible(false);
}
void ItemContainer::widgetResized(const Event &event A_UNUSED)
diff --git a/src/gui/widgets/itemcontainer.h b/src/gui/widgets/itemcontainer.h
index 0fbe84da9..3f56f8855 100644
--- a/src/gui/widgets/itemcontainer.h
+++ b/src/gui/widgets/itemcontainer.h
@@ -181,7 +181,6 @@ class ItemContainer final : public Widget,
Image *mProtectedImg;
std::string mName;
- ItemPopup *mItemPopup;
int *mShowMatrix;
Skin *mSkin;
Color mEquipedColor;