From 0192d44d46dcf948ab26371862753f4baf5aae4e Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 1 Mar 2015 15:13:10 +0300 Subject: Show item links with empty item name. --- src/gui/widgets/browserbox.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp index fe99d5f89..647013889 100644 --- a/src/gui/widgets/browserbox.cpp +++ b/src/gui/widgets/browserbox.cpp @@ -36,8 +36,11 @@ #include "resources/image.h" #include "resources/imageset.h" +#include "resources/iteminfo.h" #include "resources/resourcemanager.h" +#include "resources/db/itemdb.h" + #include "utils/stringutils.h" #include "utils/timer.h" @@ -243,6 +246,14 @@ void BrowserBox::addRow(const std::string &row, const bool atTop) bLink.caption = tmp.substr(idx2 + 1, idx3 - (idx2 + 1)); bLink.y1 = sz * font->getHeight(); bLink.y2 = bLink.y1 + font->getHeight(); + if (bLink.caption.empty()) + { + const int id = atoi(bLink.link.c_str()); + if (id) + bLink.caption = ItemDB::get(id).getName(); + else + bLink.caption = bLink.link; + } newRow.append(tmp.substr(0, idx1)); -- cgit v1.2.3-70-g09d2