diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-02-14 21:52:48 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-02-14 21:52:48 +0300 |
commit | b6f72a52c7a000f146c5aff3ab8318293cbb1c42 (patch) | |
tree | bf876ac815cc99fa9102cc2da965c98ca588e889 /src/gui/widgets | |
parent | 6db83b4ee1c20162a9dd31428cbc36ce7405352d (diff) | |
download | manaverse-b6f72a52c7a000f146c5aff3ab8318293cbb1c42.tar.gz manaverse-b6f72a52c7a000f146c5aff3ab8318293cbb1c42.tar.bz2 manaverse-b6f72a52c7a000f146c5aff3ab8318293cbb1c42.tar.xz manaverse-b6f72a52c7a000f146c5aff3ab8318293cbb1c42.zip |
Fix crash in setup input page with name gui.
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/tabs/setup_input.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/widgets/tabs/setup_input.cpp b/src/gui/widgets/tabs/setup_input.cpp index 50187cffd..545952e2d 100644 --- a/src/gui/widgets/tabs/setup_input.cpp +++ b/src/gui/widgets/tabs/setup_input.cpp @@ -25,6 +25,8 @@ #include "configuration.h" +#include "const/gui/pages.h" + #include "input/inputactionoperators.h" #include "input/inputmanager.h" #include "input/keyboardconfig.h" @@ -55,8 +57,6 @@ #include "debug.h" -static const int setupGroups = 9; - Setup_Input::Setup_Input(const Widget2 *const widget) : SetupTab(widget), mKeyListModel(new KeyListModel), @@ -73,7 +73,7 @@ Setup_Input::Setup_Input(const Widget2 *const widget) : mScrollArea(new ScrollArea(this, mKeyList, true, "setup_input_background.xml")), mKeySetting(false), - mActionDataSize(new int [9]) + mActionDataSize(new int [SETUP_PAGES]) { inputManager.setSetupInput(this); // TRANSLATORS: setting tab name @@ -81,7 +81,7 @@ Setup_Input::Setup_Input(const Widget2 *const widget) : mKeyListModel->setSelectedData(0); - for (int f = 0; f < setupGroups; f ++) + for (int f = 0; f < SETUP_PAGES; f ++) { int cnt = 0; while (!setupActionData[f][cnt].name.empty()) @@ -320,7 +320,7 @@ int Setup_Input::keyToSetupData(const InputActionT index) const std::string Setup_Input::keyToString(const InputActionT index) const { - for (int f = 0; f < setupGroups; f ++) + for (int f = 0; f < SETUP_PAGES; f ++) { for (int i = 0; i < mActionDataSize[f]; i++) { |