summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/itempopup.cpp11
-rw-r--r--src/gui/itempopup.h2
2 files changed, 8 insertions, 5 deletions
diff --git a/src/gui/itempopup.cpp b/src/gui/itempopup.cpp
index e09d0ce0a..5e50e2e55 100644
--- a/src/gui/itempopup.cpp
+++ b/src/gui/itempopup.cpp
@@ -100,7 +100,7 @@ void ItemPopup::setItem(const Item *item, bool showImage)
return;
const ItemInfo &ii = item->getInfo();
- setItem(ii, item->getColor(), showImage);
+ setItem(ii, item->getColor(), showImage, item->getId());
if (item->getRefine() > 0)
{
mLastName = ii.getName();
@@ -123,11 +123,14 @@ void ItemPopup::setItem(const Item *item, bool showImage)
}
void ItemPopup::setItem(const ItemInfo &item, unsigned char color,
- bool showImage)
+ bool showImage, int id)
{
if (!mIcon || (item.getName() == mLastName && color == mLastColor))
return;
+ if (id == -1)
+ id = item.getId();
+
int space = 0;
Image *oldImage = mIcon->getImage();
@@ -166,13 +169,13 @@ void ItemPopup::setItem(const ItemInfo &item, unsigned char color,
if (serverVersion > 0)
{
mItemName->setCaption(item.getName(color) + _(", ")
- + toString(item.getId()));
+ + toString(id));
mItemDesc->setTextWrapped(item.getDescription(color), 196);
}
else
{
mItemName->setCaption(item.getName() + _(", ")
- + toString(item.getId()));
+ + toString(id));
mItemDesc->setTextWrapped(item.getDescription(), 196);
}
diff --git a/src/gui/itempopup.h b/src/gui/itempopup.h
index 70664e022..66d7e91a2 100644
--- a/src/gui/itempopup.h
+++ b/src/gui/itempopup.h
@@ -53,7 +53,7 @@ class ItemPopup : public Popup
* Sets the info to be displayed given a particular item.
*/
void setItem(const ItemInfo &item, unsigned char color,
- bool showImage = false);
+ bool showImage = false, int id = -1);
void setItem(const Item *item, bool showImage = false);