summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/widgets/itemlinkhandler.cpp15
-rw-r--r--src/gui/widgets/itemlinkhandler.h3
2 files changed, 6 insertions, 12 deletions
diff --git a/src/gui/widgets/itemlinkhandler.cpp b/src/gui/widgets/itemlinkhandler.cpp
index f63991f8d..433639944 100644
--- a/src/gui/widgets/itemlinkhandler.cpp
+++ b/src/gui/widgets/itemlinkhandler.cpp
@@ -49,15 +49,12 @@ namespace
} // namespace
ItemLinkHandler::ItemLinkHandler() :
- LinkHandler(),
- mItemPopup(new ItemPopup)
+ LinkHandler()
{
- mItemPopup->postInit();
}
ItemLinkHandler::~ItemLinkHandler()
{
- delete2(mItemPopup);
}
void ItemLinkHandler::handleLink(const std::string &link, MouseEvent *event)
@@ -106,7 +103,7 @@ void ItemLinkHandler::handleLink(const std::string &link, MouseEvent *event)
}
else
{
- if (!mItemPopup || link.empty())
+ if (!itemPopup || link.empty())
return;
const char ch = link[0];
@@ -124,14 +121,14 @@ void ItemLinkHandler::handleLink(const std::string &link, MouseEvent *event)
if (id > 0)
{
const ItemInfo &itemInfo = ItemDB::get(id);
- mItemPopup->setItem(itemInfo, color, true);
- if (mItemPopup->isPopupVisible())
+ itemPopup->setItem(itemInfo, color, true);
+ if (itemPopup->isPopupVisible())
{
- mItemPopup->setVisible(false);
+ itemPopup->setVisible(false);
}
else if (viewport)
{
- mItemPopup->position(viewport->getMouseX(),
+ itemPopup->position(viewport->getMouseX(),
viewport->getMouseY());
}
}
diff --git a/src/gui/widgets/itemlinkhandler.h b/src/gui/widgets/itemlinkhandler.h
index 39e811721..c07ede9ad 100644
--- a/src/gui/widgets/itemlinkhandler.h
+++ b/src/gui/widgets/itemlinkhandler.h
@@ -40,9 +40,6 @@ class ItemLinkHandler final : public LinkHandler
void handleLink(const std::string &link,
MouseEvent *event) override final;
-
- private:
- ItemPopup *mItemPopup;
};
#endif // GUI_WIDGETS_ITEMLINKHANDLER_H