Qt menu fix

Noticed when working on the add_menu() crash earlier, using a mouse
rather than the keyboard to pick an entry in the sub-sub menus for
'm O' -> 'disclose' -> {any disclosure category} didn't work properly.
The problem was in post-3.6.x menu code for the Qt interface.
This commit is contained in:
PatR
2023-04-21 00:44:50 -07:00
parent 889b437775
commit 71decafefd
3 changed files with 8 additions and 2 deletions

View File

@@ -802,7 +802,7 @@ void NetHackQtMenuWindow::ChooseNone()
itemlist[row].preselected = false; // stale for all rows
// skip if not selectable or already unselected or fails invert_test()
if (!itemlist[row].Selectable()
|| !itemlist[row].selected
|| (!itemlist[row].selected && !isSelected(row))
|| !menuitem_invert_test(2, itemlist[row].itemflags, TRUE))
continue;
itemlist[row].selected = false;