summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/widgets/dropshortcutcontainer.cpp18
-rw-r--r--src/gui/widgets/dropshortcutcontainer.h1
2 files changed, 7 insertions, 12 deletions
diff --git a/src/gui/widgets/dropshortcutcontainer.cpp b/src/gui/widgets/dropshortcutcontainer.cpp
index 8fe3a8b2b..9d423f8ac 100644
--- a/src/gui/widgets/dropshortcutcontainer.cpp
+++ b/src/gui/widgets/dropshortcutcontainer.cpp
@@ -48,14 +48,11 @@
DropShortcutContainer::DropShortcutContainer(Widget2 *const widget) :
ShortcutContainer(widget),
mItemClicked(false),
- mItemPopup(new ItemPopup),
mEquipedColor(getThemeColor(Theme::ITEM_EQUIPPED)),
mEquipedColor2(getThemeColor(Theme::ITEM_EQUIPPED_OUTLINE)),
mUnEquipedColor(getThemeColor(Theme::ITEM_NOT_EQUIPPED)),
mUnEquipedColor2(getThemeColor(Theme::ITEM_NOT_EQUIPPED_OUTLINE))
{
- mItemPopup->postInit();
-
if (dropShortcut)
mMaxItems = dropShortcut->getItemCount();
else
@@ -64,7 +61,6 @@ DropShortcutContainer::DropShortcutContainer(Widget2 *const widget) :
DropShortcutContainer::~DropShortcutContainer()
{
- delete2(mItemPopup);
}
void DropShortcutContainer::setWidget2(const Widget2 *const widget)
@@ -281,23 +277,23 @@ void DropShortcutContainer::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 DropShortcutContainer::mouseExited(MouseEvent &event A_UNUSED)
{
- if (mItemPopup)
- mItemPopup->setVisible(false);
+ if (itemPopup)
+ itemPopup->setVisible(false);
}
void DropShortcutContainer::widgetHidden(const Event &event A_UNUSED)
{
- if (mItemPopup)
- mItemPopup->setVisible(false);
+ if (itemPopup)
+ itemPopup->setVisible(false);
}
diff --git a/src/gui/widgets/dropshortcutcontainer.h b/src/gui/widgets/dropshortcutcontainer.h
index 1888292de..84d85c6c0 100644
--- a/src/gui/widgets/dropshortcutcontainer.h
+++ b/src/gui/widgets/dropshortcutcontainer.h
@@ -78,7 +78,6 @@ class DropShortcutContainer final : public ShortcutContainer
private:
bool mItemClicked;
- ItemPopup *mItemPopup;
Color mEquipedColor;
Color mEquipedColor2;
Color mUnEquipedColor;