summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2011-06-02 12:04:49 +0200
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2011-06-02 16:41:47 +0200
commitde67d6fcb4f30ee34933e8bed5b4c92cffd302d2 (patch)
treece20fb74057d0211f0458bfeb34ce32d6c0294ab /src/gui/widgets
parent4e27937924766948d7ff9200f04a37fe4d59018c (diff)
downloadmana-de67d6fcb4f30ee34933e8bed5b4c92cffd302d2.tar.gz
mana-de67d6fcb4f30ee34933e8bed5b4c92cffd302d2.tar.bz2
mana-de67d6fcb4f30ee34933e8bed5b4c92cffd302d2.tar.xz
mana-de67d6fcb4f30ee34933e8bed5b4c92cffd302d2.zip
Fixed missing action event when clicking on a ListBox item
This event got lost in commit c6a081ba610c5f5f298bc80c2ef28facb41dffae and made it no longer possible to change the client resolution except by pressing Enter or Space after selecting an item.
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/listbox.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/widgets/listbox.cpp b/src/gui/widgets/listbox.cpp
index 239f4784..a3dafe72 100644
--- a/src/gui/widgets/listbox.cpp
+++ b/src/gui/widgets/listbox.cpp
@@ -125,9 +125,14 @@ void ListBox::mousePressed(gcn::MouseEvent &mouseEvent)
int y = std::max(0, mouseEvent.getY());
if (y / (int)getRowHeight() < getListModel()->getNumberOfElements())
+ {
setSelected(y / getRowHeight());
+ distributeActionEvent();
+ }
else
+ {
setSelected(-1);
+ }
}
void ListBox::mouseWheelMovedUp(gcn::MouseEvent &mouseEvent)