diff --git a/doc/fixes37.0 b/doc/fixes37.0 index d56d5c7b6..38ebeb41a 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -1,4 +1,4 @@ -NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.341 $ $NHDT-Date: 1603666043 2020/10/25 22:47:23 $ +NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.342 $ $NHDT-Date: 1603741470 2020/10/26 19:44:30 $ General Fixes and Modified Features ----------------------------------- @@ -458,6 +458,7 @@ Qt: rename toolbar button "Get" and action menu choice "Get" to "Pick up" Qt: status icons for alignment|hunger|encumbrance which started out centered relative to the label text below them would shift to being left justified when status got updated +Qt: handle '&' properly if it occurs as part of yn_function popup dialog Qt+OSX: fix control key Qt+OSX: rename menu entry "nethack->Preferences..." for invoking nethack's 'O' command to "Game->Run-time options" and entry "Game->Qt settings" diff --git a/win/Qt/qt_yndlg.cpp b/win/Qt/qt_yndlg.cpp index d7b370a32..4ea3688b0 100644 --- a/win/Qt/qt_yndlg.cpp +++ b/win/Qt/qt_yndlg.cpp @@ -246,6 +246,17 @@ char NetHackQtYnDialog::Exec() case '\033': // won't happen; ESC is hidden button_name = "Esc"; break; + case '&': + // ampersand is used as a hidden quote char to flag + // next character as a keyboard shortcut associated + // with the current action--that's inappropriate here; + // two consecutive ampersands are needed to display + // one in a button label; first check whether caller + // has already done that, skip this one if so + if (i > 0 && ch[i - 1].cell() == QChar('&')) + continue; // next i + button_name = "&&"; + break; } } button=new QPushButton(button_name);