From 286d866ddb1522cc1a44d55922415692798a09e5 Mon Sep 17 00:00:00 2001 From: BernardoGiordano Date: Fri, 13 Jul 2018 09:59:47 +0200 Subject: [PATCH] usabilitybug fix --- switch/include/scrollable.hpp | 1 + switch/source/gui.cpp | 2 +- switch/source/scrollable.cpp | 7 +++++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/switch/include/scrollable.hpp b/switch/include/scrollable.hpp index 3b80a1c..f9fa245 100644 --- a/switch/include/scrollable.hpp +++ b/switch/include/scrollable.hpp @@ -49,6 +49,7 @@ public: }; void draw(void) override; + void setIndex(size_t i); void push_back(color_t color, color_t colorMessage, const std::string& message) override; void resetIndex(void) override; void updateSelection(void) override; diff --git a/switch/source/gui.cpp b/switch/source/gui.cpp index 8311fcc..bbaef3c 100644 --- a/switch/source/gui.cpp +++ b/switch/source/gui.cpp @@ -100,7 +100,7 @@ void Gui::index(entryType_t type, size_t i) } else { - backupList->index(i); + backupList->setIndex(i); } } diff --git a/switch/source/scrollable.cpp b/switch/source/scrollable.cpp index fcde6d6..9063d83 100644 --- a/switch/source/scrollable.cpp +++ b/switch/source/scrollable.cpp @@ -26,6 +26,13 @@ #include "scrollable.hpp" +void Scrollable::setIndex(size_t i) +{ + IScrollable::index(i); + mHid->index(mIndex); + mHid->page(mPage); +} + void Scrollable::resetIndex(void) { mHid->index(0);