summaryrefslogtreecommitdiff
path: root/src/gui/smileycontainer.cpp
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2009-01-08 16:38:22 -0700
committerIra Rice <irarice@gmail.com>2009-01-08 16:38:22 -0700
commita001775f8b0b992cc7c4c5863722d02e8606b175 (patch)
tree44dfa8ab01119022b7999b27c3031a39d9d3c186 /src/gui/smileycontainer.cpp
parent193ccbdba8031a351ea622f8842b6d9a0b6cfd43 (diff)
parent611210b1e0fd9cbaed38b229462e109d8f4be385 (diff)
downloadmana-a001775f8b0b992cc7c4c5863722d02e8606b175.tar.gz
mana-a001775f8b0b992cc7c4c5863722d02e8606b175.tar.bz2
mana-a001775f8b0b992cc7c4c5863722d02e8606b175.tar.xz
mana-a001775f8b0b992cc7c4c5863722d02e8606b175.zip
Fixed include order (pedantic change)
Conflicts: src/gui/smileycontainer.cpp Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/gui/smileycontainer.cpp')
-rw-r--r--src/gui/smileycontainer.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gui/smileycontainer.cpp b/src/gui/smileycontainer.cpp
index d5e2e815..afe4ce15 100644
--- a/src/gui/smileycontainer.cpp
+++ b/src/gui/smileycontainer.cpp
@@ -26,6 +26,7 @@
#include "../graphics.h"
#include "../log.h"
+#include "../smileyshortcut.h"
#include "../resources/image.h"
#include "../resources/iteminfo.h"
@@ -159,7 +160,10 @@ void SmileyContainer::mousePressed(gcn::MouseEvent &event)
int mx = event.getX();
int my = event.getY();
int index = mx / gridWidth + ((my / gridHeight) * columns);
-
- setSelectedItemIndex(index);
+ if (index <mMaxSmiley)
+ {
+ setSelectedItemIndex(index);
+ smileyShortcut->setSmileySelected(index+1);
+ }
}
}