Qt pick-none menu vs [cancel]

Qt menus have [ok][cancel][all][none][other stuff] buttons across
the top but it was disabling [cancel] for inventory viewing and
other pick-none menus.  Enable that so that [cancel] is a viable
alternative to typing ESC or clicking on [ok] for dismissing the
menu without picking anything.
This commit is contained in:
PatR
2020-07-30 08:58:57 -07:00
parent c96a9ff389
commit 8ca0834eb2
2 changed files with 5 additions and 2 deletions

View File

@@ -222,7 +222,7 @@ int NetHackQtMenuWindow::SelectMenu(int h, MENU_ITEM_P **menu_list)
how=h;
ok->setEnabled(how!=PICK_ONE);ok->setDefault(how!=PICK_ONE);
cancel->setEnabled(how!=PICK_NONE);
cancel->setEnabled(true);
all->setEnabled(how==PICK_ANY);
none->setEnabled(how==PICK_ANY);
invert->setEnabled(how==PICK_ANY);