diff options
author | Tametomo <irarice@gmail.com> | 2009-05-12 13:21:51 -0600 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2010-02-14 20:54:02 +0100 |
commit | 6f1947e0d468ca59404b4bbaeafd29be136b99ac (patch) | |
tree | 6110c4c0487af82e75746f0643d7cf7e25cc061d | |
parent | 751f21a4bde7384dd91b376c151d01d4b3d5cf9d (diff) | |
download | mana-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>
-rw-r--r-- | src/gui/widgets/dropdown.cpp | 6 |
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) |