From b45354950a08e4fcd070e87ea58c8eca635cb40d Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 23 Apr 2022 10:38:54 +0300 Subject: [PATCH 48/48] Qt: Make also the last couple of shortcuts available Iterations over shortcuts cut a bit short, leaving last couple of them outside any handling. See osdn #44406 Signed-off-by: Marko Lindqvist --- client/gui-qt/shortcuts.cpp | 3 ++- client/gui-qt/shortcuts.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/client/gui-qt/shortcuts.cpp b/client/gui-qt/shortcuts.cpp index 226dcf8061..f558a41be7 100644 --- a/client/gui-qt/shortcuts.cpp +++ b/client/gui-qt/shortcuts.cpp @@ -53,7 +53,8 @@ enum { static bool use_default_shortcuts = false; -static int num_shortcuts = 57; +static int num_shortcuts = SC_NUM_SHORTCUTS; + fc_shortcut default_shortcuts[] = { {SC_SCROLL_MAP, 0, Qt::RightButton, Qt::NoModifier, "Scroll map" }, {SC_CENTER_VIEW, Qt::Key_C, Qt::AllButtons, Qt::NoModifier, diff --git a/client/gui-qt/shortcuts.h b/client/gui-qt/shortcuts.h index a580f70b31..b2a26b37c2 100644 --- a/client/gui-qt/shortcuts.h +++ b/client/gui-qt/shortcuts.h @@ -94,6 +94,8 @@ enum shortcut_id { SC_STACK_SIZE = 60 }; +#define SC_NUM_SHORTCUTS 60 + /************************************************************************** Base shortcut struct -- 2.35.1