From 1d8cad58db277b8113df6b941c7c81a2fe461fae Mon Sep 17 00:00:00 2001 From: James Turner Date: Sat, 4 Apr 2020 08:01:57 +0100 Subject: [PATCH] Mouse input: tidy some logic --- src/Input/FGMouseInput.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Input/FGMouseInput.cxx b/src/Input/FGMouseInput.cxx index 2e2930079..66c101fae 100644 --- a/src/Input/FGMouseInput.cxx +++ b/src/Input/FGMouseInput.cxx @@ -561,7 +561,7 @@ void FGMouseInput::doMouseClick (int b, int updown, int x, int y, bool mainWindo SGSceneryPicks pickList = globals->get_renderer()->pick(windowPos); - if( updown != MOUSE_BUTTON_DOWN ) + if( updown == MOUSE_BUTTON_UP ) { // Execute the mouse up event in any case, may be we should // stop processing here? @@ -572,7 +572,7 @@ void FGMouseInput::doMouseClick (int b, int updown, int x, int y, bool mainWindo { SGPickCallbackPtr& cb = callbacks.front(); const SGSceneryPick* pick = getPick(pickList, cb); - cb->buttonReleased(ea->getModKeyMask(), *ea, pick ? &pick->info : 0); + cb->buttonReleased(ea->getModKeyMask(), *ea, pick ? &pick->info : nullptr); callbacks.pop_front(); }