summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2012-02-10 17:31:09 +0100
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2012-02-12 21:03:36 +0100
commit9d2f44ee9c2a026d353c00836441f1c47b3dfa33 (patch)
treed5e84e660ecd311432cd6750fc8b8f5ab26872a9
parent56490c86949135687e1ab0dd43d605c653f26c45 (diff)
downloadmana-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
-rw-r--r--src/gui/widgets/itemcontainer.cpp9
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++;
}
}