]> git.mxchange.org Git - flightgear.git/commitdiff
Do not assume there is a mouse mode with index 3.
authorThomas Geymayer <tomgey@gmail.com>
Wed, 30 Jul 2014 21:54:04 +0000 (23:54 +0200)
committerThomas Geymayer <tomgey@gmail.com>
Wed, 30 Jul 2014 21:54:04 +0000 (23:54 +0200)
src/Input/FGMouseInput.cxx

index 6d052c8817f544e76db793991f40e92ef09e2e71..90a5efde93bebafc0baa9a398798a05ccfc5b038 100644 (file)
@@ -641,7 +641,7 @@ void FGMouseInput::processMotion(int x, int y, const osgGA::GUIEventAdapter* ea)
   mouse &m = d->mice[0];
   int modeIndex = m.current_mode;
   // are we in spring-loaded look mode?
-  if (!d->rightClickModeCycle) {
+  if (!d->rightClickModeCycle && m.nModes > 3) {
     if (m.mouse_button_nodes[2]->getBoolValue()) {
       // right mouse is down, force look mode
       modeIndex = 3;