summaryrefslogtreecommitdiff
path: root/src/gui/widgets/itemcontainer.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-09-14 02:54:44 +0300
committerAndrei Karas <akaras@inbox.ru>2012-09-14 02:54:44 +0300
commit84499779fcf0c8b5392a88f1c9311775e692ebef (patch)
treef390326a50eed73d8f8c62107979a4d81093ce52 /src/gui/widgets/itemcontainer.cpp
parent4ee30f47b491de0ace9b692072fd286cf12c7828 (diff)
downloadplus-84499779fcf0c8b5392a88f1c9311775e692ebef.tar.gz
plus-84499779fcf0c8b5392a88f1c9311775e692ebef.tar.bz2
plus-84499779fcf0c8b5392a88f1c9311775e692ebef.tar.xz
plus-84499779fcf0c8b5392a88f1c9311775e692ebef.zip
Improve a bit some gui controls speed.
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;