diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-10-05 12:45:41 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-10-05 12:45:41 +0300 |
commit | 01660865a49250c6ed77159cb3d8b38e7ea37b95 (patch) | |
tree | d08d552b885ac4e735d778200963f9f64190e37b /src/gui/widgets/listbox.cpp | |
parent | 901898455259123e13a32a35052b4cadfa8c8a30 (diff) | |
download | mv-01660865a49250c6ed77159cb3d8b38e7ea37b95.tar.gz mv-01660865a49250c6ed77159cb3d8b38e7ea37b95.tar.bz2 mv-01660865a49250c6ed77159cb3d8b38e7ea37b95.tar.xz mv-01660865a49250c6ed77159cb3d8b38e7ea37b95.zip |
Run click action in list box only after mouse released.
Before was on mouse pressed.
Diffstat (limited to 'src/gui/widgets/listbox.cpp')
-rw-r--r-- | src/gui/widgets/listbox.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/widgets/listbox.cpp b/src/gui/widgets/listbox.cpp index 4dd1da8d9..8d945180a 100644 --- a/src/gui/widgets/listbox.cpp +++ b/src/gui/widgets/listbox.cpp @@ -204,11 +204,11 @@ void ListBox::mouseWheelMovedDown(gcn::MouseEvent &mouseEvent A_UNUSED) { } -void ListBox::mousePressed(gcn::MouseEvent &event) +void ListBox::mouseReleased(gcn::MouseEvent &event) { if (mDistributeMousePressed) { - mousePressed1(event); + mouseReleased1(event); } else { @@ -222,7 +222,7 @@ void ListBox::mousePressed(gcn::MouseEvent &event) if (gui) gui->resetClickCount(); if (mOldSelected == mSelected) - mousePressed1(event); + mouseReleased1(event); else mouseDragged(event); mOldSelected = mSelected; @@ -235,7 +235,7 @@ void ListBox::mousePressed(gcn::MouseEvent &event) } } -void ListBox::mousePressed1(gcn::MouseEvent &mouseEvent) +void ListBox::mouseReleased1(gcn::MouseEvent &mouseEvent) { if (mouseEvent.getButton() == gcn::MouseEvent::LEFT) { |