diff options
author | Torbjörn Andersson | 2003-07-23 16:44:15 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2003-07-23 16:44:15 +0000 |
commit | 20dd02a833469aacf7e2e251f2a4a01853af1893 (patch) | |
tree | a4792ba443418a5db219980cb8dcf662cd093cf1 /gui | |
parent | 9db2d93614ea354155c2a0b0fdf50b306aed153a (diff) | |
download | scummvm-rg350-20dd02a833469aacf7e2e251f2a4a01853af1893.tar.gz scummvm-rg350-20dd02a833469aacf7e2e251f2a4a01853af1893.tar.bz2 scummvm-rg350-20dd02a833469aacf7e2e251f2a4a01853af1893.zip |
Don't check for hotkeys when ascii is 0, since that is the default hotkey
for widgets that have none. (This means the Shift key words in text edit
widgets again, for instance.)
svn-id: r9148
Diffstat (limited to 'gui')
-rw-r--r-- | gui/dialog.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/gui/dialog.cpp b/gui/dialog.cpp index 42f6711542..0a3c9ae0b8 100644 --- a/gui/dialog.cpp +++ b/gui/dialog.cpp @@ -184,17 +184,19 @@ void Dialog::handleKeyDown(uint16 ascii, int keycode, int modifiers) { } // Hotkey handling - Widget *w = _firstWidget; - ascii = toupper(ascii); - while (w) { - if (w->_type == kButtonWidget && ascii == toupper(((ButtonWidget *)w)->_hotkey)) { - // The hotkey for widget w was pressed. We fake a mouse click into the - // button by invoking the appropriate methods. - w->handleMouseDown(0, 0, 1, 1); - w->handleMouseUp(0, 0, 1, 1); - return; + if (ascii != 0) { + Widget *w = _firstWidget; + ascii = toupper(ascii); + while (w) { + if (w->_type == kButtonWidget && ascii == toupper(((ButtonWidget *)w)->_hotkey)) { + // The hotkey for widget w was pressed. We fake a mouse click into the + // button by invoking the appropriate methods. + w->handleMouseDown(0, 0, 1, 1); + w->handleMouseUp(0, 0, 1, 1); + return; + } + w = w->_next; } - w = w->_next; } // ESC closes all dialogs by default |