From: PatR Date: Sat, 16 Apr 2022 21:53:43 +0000 (-0700) Subject: Qt extended command entry X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f04f974c1162c37c8013310ab7a4eb9c444586fc;p=nethack Qt extended command entry For Qt with 'popup_dialog' off, if I typed "#quit" then the prompt "Really quit?" was displayed in the message window as expected. But if I typed "#" and then clicked on [quit], sometimes the prompt wasn't visible even though the program was waiting for me to answer it. I've noticed this a time or two in the past and just pretended that it hadn't happened; since I usually enter extended commands by typing their name, it didn't stand out much. Testing #repeat with extended commands brought it back to mind. I don't understand what's going on, but this one-line patch seems to solve it. (With a multi-line message window, clear_nhwindow() doesn't erase anything, but for Qt it does update the most recent entry.) --- diff --git a/win/Qt/qt_bind.cpp b/win/Qt/qt_bind.cpp index f5592b504..5039f6541 100644 --- a/win/Qt/qt_bind.cpp +++ b/win/Qt/qt_bind.cpp @@ -841,6 +841,8 @@ int NetHackQtBind::qt_get_ext_cmd() result = xcmd->get(); delete xcmd; } while (result == xcmdNoMatch); + // refresh message window after extended command dialog is dismissed + NetHackQtBind::qt_clear_nhwindow(WIN_MESSAGE); return result; }