From 054c4bec0f05fd57eab579d00890daebafb8000f Mon Sep 17 00:00:00 2001 From: James Turner Date: Wed, 23 May 2018 14:16:11 +0100 Subject: [PATCH] Bug-fix: for RMB-look / PUI interaction issue When releasing the RMB over a PUI dialog, we no longer get stuck in drag mode due to the buttons map getting out of state. This is slightly ugly work-around, better fix to follow hopefully (needs better OSG integration) --- src/Input/FGMouseInput.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Input/FGMouseInput.cxx b/src/Input/FGMouseInput.cxx index ea29d8de8..6d60aeca2 100644 --- a/src/Input/FGMouseInput.cxx +++ b/src/Input/FGMouseInput.cxx @@ -712,5 +712,10 @@ bool FGMouseInput::isActiveModePassThrough() const } mouse &m = d->mice[0]; - return m.modes[m.current_mode].pass_through; + int mode = m.current_mode; + if (isRightDragToLookEnabled() && m.mouse_button_nodes[2]->getBoolValue()) { + mode = 3; + } + + return m.modes[mode].pass_through; }