diff options
author | Bjørn <bjorn@horst-dieter.(none)> | 2009-04-12 18:04:33 +0200 |
---|---|---|
committer | Bjørn <bjorn@horst-dieter.(none)> | 2009-04-12 19:06:37 +0200 |
commit | a6998fbdfaf84aa1920564d97e3421ed28c9a893 (patch) | |
tree | 592fb9e78946a4f539e7c1dd3210b50f68e4f961 /src/gui/itemlinkhandler.cpp | |
parent | acbafa84774d4addeb4da0206762d64febf26d3e (diff) | |
download | mana-a6998fbdfaf84aa1920564d97e3421ed28c9a893.tar.gz mana-a6998fbdfaf84aa1920564d97e3421ed28c9a893.tar.bz2 mana-a6998fbdfaf84aa1920564d97e3421ed28c9a893.tar.xz mana-a6998fbdfaf84aa1920564d97e3421ed28c9a893.zip |
Cleaned up the ItemPopup class a bit
Removed methods updateColors, getItemName and getNumRows. The last one
was also removed from some other classes.
Diffstat (limited to 'src/gui/itemlinkhandler.cpp')
-rw-r--r-- | src/gui/itemlinkhandler.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/gui/itemlinkhandler.cpp b/src/gui/itemlinkhandler.cpp index 29fa310d..6476ce60 100644 --- a/src/gui/itemlinkhandler.cpp +++ b/src/gui/itemlinkhandler.cpp @@ -32,7 +32,6 @@ ItemLinkHandler::ItemLinkHandler() { mItemPopup = new ItemPopup; - mItemPopup->setOpaque(false); } ItemLinkHandler::~ItemLinkHandler() @@ -46,21 +45,16 @@ void ItemLinkHandler::handleLink(const std::string &link) std::stringstream stream; stream << link; stream >> id; + if (id > 0) { const ItemInfo &iteminfo = ItemDB::get(id); - if (iteminfo.getName() != mItemPopup->getItemName()) - mItemPopup->setItem(iteminfo); + mItemPopup->setItem(iteminfo); if (mItemPopup->isVisible()) - { mItemPopup->setVisible(false); - } else - { - mItemPopup->updateColors(); mItemPopup->view(viewport->getMouseX(), viewport->getMouseY()); - } } } |