From 9d2f44ee9c2a026d353c00836441f1c47b3dfa33 Mon Sep 17 00:00:00 2001 From: Yohann Ferreira Date: Fri, 10 Feb 2012 17:31:09 +0100 Subject: Fixed inventory display MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/gui/widgets/itemcontainer.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/gui') 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++; } } -- cgit v1.2.3-70-g09d2