Qt: new game vs saved game selection

If player got Qt's saved game selection widget at startup but
picked "new game" there, the save file for the last character
in the list of saved games would be clobbered with the new
character's game if a save was performed.  It wasn't necessarily
easy to spot because saved game selection shows the character
name from inside the file rather than from the file name, so the
next restore would look normal except for one older character
missing.

Noticed while testing:  when you used the character selection
widget (either by picking "new game" in saved game selection or
because there aren't any save files), if you blanked out the
name field or it was already blanked because a generic name like
"player" had been specified, then clicked on "play", the program
would get stuck in a loop somewhere.  I didn't try to figure out
where, just changed qt_askname() to revert to original name if
it ended up with a blank one.
This commit is contained in:
PatR
2020-10-27 15:10:22 -07:00
parent 14ec98a241
commit 70e4f5b197
3 changed files with 34 additions and 20 deletions

View File

@@ -1,4 +1,4 @@
NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.343 $ $NHDT-Date: 1603777052 2020/10/27 05:37:32 $
NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.344 $ $NHDT-Date: 1603836614 2020/10/27 22:10:14 $
General Fixes and Modified Features
-----------------------------------
@@ -462,6 +462,10 @@ Qt: handle '&' properly if it occurs as part of yn_function popup dialog
Qt: fix the display side of saved game selection; character names for
available save files are shown in a column of push buttons instead
of each button overwriting all the ones before it
Qt: don't clobber an existing save file after choosing "new game" in the
saved game selection widget
Qt: don't get stuck in a loop after choosing "play" while the character name
field is empty in the character selection widget
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"