1
0
Fork 0

Mouse input: tidy some logic

This commit is contained in:
James Turner 2020-04-04 08:01:57 +01:00
parent cb08eb6d6d
commit 1d8cad58db

View file

@ -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();
}