aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
Diffstat (limited to 'gui')
-rw-r--r--gui/widgets/popup.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/gui/widgets/popup.cpp b/gui/widgets/popup.cpp
index 351d0fe559..ebb69f1e4d 100644
--- a/gui/widgets/popup.cpp
+++ b/gui/widgets/popup.cpp
@@ -155,7 +155,8 @@ void PopUpDialog::handleMouseUp(int x, int y, int button, int clickCount) {
// let the popup stay open. If it did move, assume the user made his selection.
int dist = (_clickX - absX) * (_clickX - absX) + (_clickY - absY) * (_clickY - absY);
if (dist > 3 * 3 || g_system->getMillis() - _openTime > 300) {
- setResult(_selection);
+ int item = findItem(x, y);
+ setResult(item);
close();
}
_clickX = -1;