diff --git a/doc/fixes37.0 b/doc/fixes37.0 index 63fae5848..e19dddaf2 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -1,4 +1,4 @@ -NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.428 $ $NHDT-Date: 1610587460 2021/01/14 01:24:20 $ +NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.429 $ $NHDT-Date: 1610665839 2021/01/14 23:10:39 $ General Fixes and Modified Features ----------------------------------- @@ -596,6 +596,10 @@ Qt: there was no way to enter extended command "#version" by typing; command name matching was waiting to disambiguate it from "#versionshort" and the only way to that was to type #version but explicitly triggered rejection, cancelling '#' processing +Qt: while a text window was shown (such as the "things that are here" popup + when stepping on items), typing commands had the input passed on to + the map and then executed; sometimes that caused the not-yet-dismissed + text window to hang Qt: {maybe just Qt+OSX:} when viewing a text window ('V' to look at 'history' for instance), clicking on [Search], entering a search target in the resulting popup and clicking on [Okay] or typing , the text diff --git a/win/Qt/qt_menu.cpp b/win/Qt/qt_menu.cpp index b86e7484f..16448e891 100644 --- a/win/Qt/qt_menu.cpp +++ b/win/Qt/qt_menu.cpp @@ -1175,7 +1175,7 @@ void NetHackQtTextWindow::Search() this->raise(); } - if (get_a_line) { + if (get_a_line && target[0]) { int linecount = lines->count(); int current = lines->currentRow(); if (current == -1) @@ -1215,13 +1215,16 @@ void NetHackQtTextWindow::keyPressEvent(QKeyEvent *key_event) if (key == MENU_SEARCH) { if (!use_rip) Search(); - } else if (key == '\n' || key == '\r') { + } else if (key == '\n' || key == '\r' || key == ' ') { if (!textsearching) accept(); + else + textsearching = FALSE; } else if (key == '\033') { reject(); } else { - QDialog::keyPressEvent(key_event); + // ignore the current key instead of passing it along + //- QDialog::keyPressEvent(key_event); } }