summaryrefslogtreecommitdiff
path: root/src/item.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-08-17 00:31:59 +0300
committerAndrei Karas <akaras@inbox.ru>2015-08-17 00:31:59 +0300
commit61483740edea22a6f5ef974f7b2b0796ff49fb6e (patch)
tree994d5335111234926948ae6e243aff178f37692f /src/item.cpp
parent9fe27169625eb51dbab172bb3d9cb27a06141486 (diff)
downloadplus-61483740edea22a6f5ef974f7b2b0796ff49fb6e.tar.gz
plus-61483740edea22a6f5ef974f7b2b0796ff49fb6e.tar.bz2
plus-61483740edea22a6f5ef974f7b2b0796ff49fb6e.tar.xz
plus-61483740edea22a6f5ef974f7b2b0796ff49fb6e.zip
Fix item icon color if insert card in it.
Diffstat (limited to 'src/item.cpp')
-rw-r--r--src/item.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/item.cpp b/src/item.cpp
index 0ccfd025a..d0c30371a 100644
--- a/src/item.cpp
+++ b/src/item.cpp
@@ -22,13 +22,14 @@
#include "item.h"
+#include "configuration.h"
#include "dragdrop.h"
+#include "itemcolormanager.h"
#include "gui/theme.h"
#include "resources/iteminfo.h"
#include "resources/resourcemanager.h"
-#include "configuration.h"
#include "net/serverfeatures.h"
@@ -174,3 +175,9 @@ void Item::addCard(const int card)
}
}
}
+
+void Item::updateColor()
+{
+ if (serverFeatures->haveItemColors())
+ setId(mId, ItemColorManager::getColorFromCards(&mCards[0]));
+}