summaryrefslogtreecommitdiff
path: root/src/gui/widgets/itemcontainer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/itemcontainer.cpp')
-rw-r--r--src/gui/widgets/itemcontainer.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp
index 08c26d152..19f35ff02 100644
--- a/src/gui/widgets/itemcontainer.cpp
+++ b/src/gui/widgets/itemcontainer.cpp
@@ -226,11 +226,13 @@ void ItemContainer::draw(gcn::Graphics *graphics)
for (int j = 0; j < mGridRows; j++)
{
+ const int intY0 = j * BOX_HEIGHT;
+ int itemIndex = j * mGridColumns - 1;
for (int i = 0; i < mGridColumns; i++)
{
int itemX = i * BOX_WIDTH;
- int itemY = j * BOX_HEIGHT;
- const int itemIndex = j * mGridColumns + i;
+ int itemY = intY0;
+ itemIndex ++;
if (mShowMatrix[itemIndex] < 0)
continue;