]> granicus.if.org Git - nethack/commitdiff
Qt4: handle menu page selector keys
authorPasi Kallinen <paxed@alt.org>
Tue, 10 Oct 2017 15:20:29 +0000 (18:20 +0300)
committerPasi Kallinen <paxed@alt.org>
Tue, 10 Oct 2017 15:20:34 +0000 (18:20 +0300)
Qt4 doesn't do menu paging, so handle the select page, invert page,
and unselect page like selecting, inverting or unselecting all.

win/Qt4/qt4menu.cpp

index 7d70a26e2a7402de71b3b945604d28a55f68c351..a6fc8c2f5e9444aab62b4508580ac7be1e292522 100644 (file)
@@ -482,11 +482,11 @@ void NetHackQtMenuWindow::keyPressEvent(QKeyEvent* event)
            accept();
        else if (key==MENU_SEARCH)
            Search();
-       else if (key==MENU_SELECT_ALL)
+       else if (key==MENU_SELECT_ALL || key==MENU_SELECT_PAGE)
            All();
-       else if (key==MENU_INVERT_ALL)
+       else if (key==MENU_INVERT_ALL || key==MENU_INVERT_PAGE)
            Invert();
-       else if (key==MENU_UNSELECT_ALL)
+       else if (key==MENU_UNSELECT_ALL || key==MENU_UNSELECT_PAGE)
            ChooseNone();
        else if (('0' <= key && key <= '9') || key == '\b')
            InputCount(key);