summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-03-01 15:13:10 +0300
committerAndrei Karas <akaras@inbox.ru>2015-03-01 15:13:10 +0300
commit0192d44d46dcf948ab26371862753f4baf5aae4e (patch)
treec8fc3ff1d7375638b891ebda06643fa194fe294f /src
parent2c02974d98d94f54b70434202bb2edf4cba8640f (diff)
downloadplus-0192d44d46dcf948ab26371862753f4baf5aae4e.tar.gz
plus-0192d44d46dcf948ab26371862753f4baf5aae4e.tar.bz2
plus-0192d44d46dcf948ab26371862753f4baf5aae4e.tar.xz
plus-0192d44d46dcf948ab26371862753f4baf5aae4e.zip
Show item links with empty item name.
Diffstat (limited to 'src')
-rw-r--r--src/gui/widgets/browserbox.cpp11
1 files changed, 11 insertions, 0 deletions
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));