1
0
Fork 0

Do not assume there is a mouse mode with index 3.

This commit is contained in:
Thomas Geymayer 2014-07-30 23:54:04 +02:00
parent d836126c75
commit 90f197fbc4

View 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;