summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorTametomo <irarice@gmail.com>2009-05-12 13:21:51 -0600
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2010-02-14 20:54:02 +0100
commit6f1947e0d468ca59404b4bbaeafd29be136b99ac (patch)
tree6110c4c0487af82e75746f0643d7cf7e25cc061d /src/gui/widgets
parent751f21a4bde7384dd91b376c151d01d4b3d5cf9d (diff)
downloadmana-6f1947e0d468ca59404b4bbaeafd29be136b99ac.tar.gz
mana-6f1947e0d468ca59404b4bbaeafd29be136b99ac.tar.bz2
mana-6f1947e0d468ca59404b4bbaeafd29be136b99ac.tar.xz
mana-6f1947e0d468ca59404b4bbaeafd29be136b99ac.zip
Fixed duplicating of up and down actions with the dropdown widget. (it
used to get one event from the dropdown, then another from the listbox if dropped down. Otherwise, it only got one from the dropdown) Signed-off-by: Tametomo <irarice@gmail.com>
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/dropdown.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/widgets/dropdown.cpp b/src/gui/widgets/dropdown.cpp
index b8f5b895..c45dc226 100644
--- a/src/gui/widgets/dropdown.cpp
+++ b/src/gui/widgets/dropdown.cpp
@@ -212,12 +212,14 @@ void DropDown::keyPressed(gcn::KeyEvent& keyEvent)
}
else if (key.getValue() == Key::UP)
{
- setSelected(getSelected() - 1);
+ if (!mDroppedDown)
+ setSelected(getSelected() - 1);
keyEvent.consume();
}
else if (key.getValue() == Key::DOWN)
{
- setSelected(getSelected() + 1);
+ if (!mDroppedDown)
+ setSelected(getSelected() + 1);
keyEvent.consume();
}
else if (key.getValue() == Key::HOME)