diff options
author | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2012-02-10 17:31:09 +0100 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2012-02-12 21:03:36 +0100 |
commit | 9d2f44ee9c2a026d353c00836441f1c47b3dfa33 (patch) | |
tree | d5e84e660ecd311432cd6750fc8b8f5ab26872a9 /src/gui/widgets/itemcontainer.cpp | |
parent | 56490c86949135687e1ab0dd43d605c653f26c45 (diff) | |
download | mana-9d2f44ee9c2a026d353c00836441f1c47b3dfa33.tar.gz mana-9d2f44ee9c2a026d353c00836441f1c47b3dfa33.tar.bz2 mana-9d2f44ee9c2a026d353c00836441f1c47b3dfa33.tar.xz mana-9d2f44ee9c2a026d353c00836441f1c47b3dfa33.zip |
Fixed inventory display
The filter system added while ago used to override the item slot
true order, even when being empty.
I now made the draw ordering change only when the filter is in use.
Reviewed-by: Thorbjørn Lindeijer
Diffstat (limited to 'src/gui/widgets/itemcontainer.cpp')
-rw-r--r-- | src/gui/widgets/itemcontainer.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp index 9b69c121..f15fe682 100644 --- a/src/gui/widgets/itemcontainer.cpp +++ b/src/gui/widgets/itemcontainer.cpp @@ -116,10 +116,13 @@ void ItemContainer::draw(gcn::Graphics *graphics) { if (normalize(item->getInfo().getName()).find(mFilter) == std::string::npos) continue; + mFilteredMap[currentIndex] = item; + currentIndex++; + } + else + { + mFilteredMap[itemIndex] = item; } - - mFilteredMap[currentIndex] = item; - currentIndex++; } } |