History

fix stuck drive keys for Avatar when modifier released

Stephen Birarda committed 12 years ago

Commit de248421 parent 0e4de533 files · +17 −3Browse files

Showing the changes to interface/src/Application.cpp (1 of 3 files). Show all

Unified · Split

interface/src/Application.cpp+10−3
@@ -905,7 +905,9 @@ void Application::keyPressEvent(QKeyEvent* event) { · 904 unmodified lines
905905 break;
906906
907907 case Qt::Key_D:
908− _myAvatar->setDriveKeys(ROT_RIGHT, 1.f);
908+ if (!isMeta) {
909+ _myAvatar->setDriveKeys(ROT_RIGHT, 1.f);
910+ }
909911 break;
910912
911913 case Qt::Key_Return:
@@ -1073,7 +1075,7 @@ void Application::keyReleaseEvent(QKeyEvent* event) { · 161 unmodified lines
10731075 _keysPressed.remove(event->key());
10741076
10751077 _controllerScriptingInterface.emitKeyReleaseEvent(event); // send events to any registered scripts
1076−
1078+
10771079 // if one of our scripts have asked to capture this event, then stop processing it
10781080 if (_controllerScriptingInterface.isKeyCaptured(event)) {
10791081 return;
@@ -1125,7 +1127,12 @@ void Application::keyReleaseEvent(QKeyEvent* event) { · 45 unmodified lines
11251127 _myAvatar->setDriveKeys(RIGHT, 0.f);
11261128 _myAvatar->setDriveKeys(ROT_RIGHT, 0.f);
11271129 break;
1128−
1130+ case Qt::Key_Control:
1131+ case Qt::Key_Shift:
1132+ case Qt::Key_Meta:
1133+ case Qt::Key_Alt:
1134+ _myAvatar->clearDriveKeys();
1135+ break;
11291136 default:
11301137 event->ignore();
11311138 break;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t