From 9b3e13d4246930f0aa4dfb86e735466032d283dd Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 4 Jun 2011 21:30:42 +0300 Subject: Fix colors support in shortcuts panel --- src/gui/widgets/itemshortcutcontainer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/gui/widgets/itemshortcutcontainer.cpp b/src/gui/widgets/itemshortcutcontainer.cpp index 362cfad54..b33c7ee26 100644 --- a/src/gui/widgets/itemshortcutcontainer.cpp +++ b/src/gui/widgets/itemshortcutcontainer.cpp @@ -222,6 +222,7 @@ void ItemShortcutContainer::mouseDragged(gcn::MouseEvent &event) return; const int itemId = itemShortcut[mNumber]->getItem(index); + const int itemColor = itemShortcut[mNumber]->getItemColor(index); if (itemId < 0) return; @@ -231,7 +232,8 @@ void ItemShortcutContainer::mouseDragged(gcn::MouseEvent &event) if (!PlayerInfo::getInventory()) return; - Item *item = PlayerInfo::getInventory()->findItem(itemId); + Item *item = PlayerInfo::getInventory()->findItem( + itemId, itemColor); if (item) { @@ -283,8 +285,6 @@ void ItemShortcutContainer::mousePressed(gcn::MouseEvent &event) } else if (event.getButton() == gcn::MouseEvent::RIGHT) { -// Item *item = PlayerInfo::getInventory()->findItem(id); - if (viewport && itemShortcut[mNumber]) { viewport->showItemPopup(itemShortcut[mNumber]->getItem(index), -- cgit v1.2.3-70-g09d2