'sortpack' vs 'perm_invent'

The persistent inventory window wasn't being updated if you toggled
the 'sortpack' option interactively.  (The new setting was honored
once something else triggered a 'perm_invent' update.)

The logic for toggling 'fixinv' seemed backwards.  I hope this "fix"
for that hasn't actually broken it.
This commit is contained in:
PatR
2019-06-24 18:54:38 -07:00
parent e3af33c9db
commit 8a9c06f5c1
2 changed files with 8 additions and 7 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 options.c $NHDT-Date: 1561022792 2019/06/20 09:26:32 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.365 $ */
/* NetHack 3.6 options.c $NHDT-Date: 1561427671 2019/06/25 01:54:31 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.366 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Michael Allison, 2008. */
/* NetHack may be freely redistributed. See license for details. */
@@ -4051,12 +4051,12 @@ boolean tinitial, tfrom_file;
if (VIA_WINDOWPORT())
status_initialize(REASSESS_ONLY);
context.botl = TRUE;
} else if (boolopt[i].addr == &flags.invlet_constant) {
if (flags.invlet_constant) {
} else if (boolopt[i].addr == &flags.invlet_constant
|| boolopt[i].addr == &flags.sortpack) {
if (!flags.invlet_constant)
reassign();
if (iflags.perm_invent)
need_redraw = TRUE;
}
if (iflags.perm_invent)
update_inventory();
} else if (boolopt[i].addr == &flags.lit_corridor
|| boolopt[i].addr == &flags.dark_room) {
/*