1
0
Fork 0

Disable flight-related key-bindings in the WaypointList widget for 2.4 release, pending a better solution to PLIB's lack of focus.

This commit is contained in:
James Turner 2011-07-16 13:25:29 +01:00
parent 529ce6b26e
commit 8e682cb8a4

View file

@ -21,6 +21,11 @@
#include <Navaids/positioned.hxx> #include <Navaids/positioned.hxx>
#include <Autopilot/route_mgr.hxx> #include <Autopilot/route_mgr.hxx>
// select if the widget grabs keys necessary to fly aircraft from the keyboard,
// or not. See http://code.google.com/p/flightgear-bugs/issues/detail?id=338
// for discussion about why / what is going on.
#define AVOID_FLIGHT_KEYS 1
using namespace flightgear; using namespace flightgear;
enum { enum {
@ -659,6 +664,10 @@ int WaypointList::checkKey (int key, int updown )
if ((updown == PU_UP) || !isVisible () || !isActive () || (window != puGetWindow())) { if ((updown == PU_UP) || !isVisible () || !isActive () || (window != puGetWindow())) {
return FALSE ; return FALSE ;
} }
#ifdef AVOID_FLIGHT_KEYS
return FALSE;
#endif
switch (key) switch (key)
{ {