summaryrefslogtreecommitdiff
path: root/src/gui/widgets/itemcontainer.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-08-25 00:54:59 +0300
committerAndrei Karas <akaras@inbox.ru>2017-08-25 00:54:59 +0300
commitcf06e522d4914ba89db1544003a3572f6d19bd02 (patch)
tree9533674634834f4ce67ba50eb4dfa6796df697f4 /src/gui/widgets/itemcontainer.cpp
parent3874b588e2a9d70eb678c8a33785a575b16fa7b2 (diff)
downloadmanaverse-cf06e522d4914ba89db1544003a3572f6d19bd02.tar.gz
manaverse-cf06e522d4914ba89db1544003a3572f6d19bd02.tar.bz2
manaverse-cf06e522d4914ba89db1544003a3572f6d19bd02.tar.xz
manaverse-cf06e522d4914ba89db1544003a3572f6d19bd02.zip
Hide item container slots if item present with amount 0.
Diffstat (limited to 'src/gui/widgets/itemcontainer.cpp')
-rw-r--r--src/gui/widgets/itemcontainer.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp
index fd998180a..26c6e2e06 100644
--- a/src/gui/widgets/itemcontainer.cpp
+++ b/src/gui/widgets/itemcontainer.cpp
@@ -1173,7 +1173,8 @@ int ItemContainer::updateMatrix()
if (item == nullptr ||
item->getId() == 0 ||
- !item->isHaveTag(mTag))
+ !item->isHaveTag(mTag) ||
+ item->getQuantity() == 0)
{
if (mShowEmptyRows == ShowEmptyRows_true)
sortedItems.push_back(new ItemIdPair(idx, nullptr));