From b386dd23fb0384d4bc977db9ae6e821ee7077d3c Mon Sep 17 00:00:00 2001 From: Kilrah Date: Fri, 27 Apr 2018 12:56:28 +0200 Subject: [PATCH] Fix fast value edit --- radio/src/gui/128x64/navigation.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/radio/src/gui/128x64/navigation.cpp b/radio/src/gui/128x64/navigation.cpp index 3428d349f..03022e5ab 100644 --- a/radio/src/gui/128x64/navigation.cpp +++ b/radio/src/gui/128x64/navigation.cpp @@ -350,7 +350,12 @@ int checkIncDec(event_t event, int val, int i_min, int i_max, unsigned int i_fla if (event==EVT_KEY_FIRST(KEY_RIGHT) || event==EVT_KEY_REPT(KEY_RIGHT) || (s_editMode>0 && (IS_ROTARY_RIGHT(event) || event==EVT_KEY_FIRST(KEY_UP) || event==EVT_KEY_REPT(KEY_UP)))) { #endif do { - newval++; + if (IS_KEY_REPT(event) && (i_flags & INCDEC_REP10)) { + newval += min(10, i_max-val); + } + else { + newval++; + } } while (isValueAvailable && !isValueAvailable(newval) && newval<=i_max); if (newval > i_max) {