From 8ada468367ffcf5fc6515bef831d0e7189ca82af Mon Sep 17 00:00:00 2001 From: forntoh Date: Mon, 29 Jan 2024 02:45:23 +0100 Subject: [PATCH] Do not update screen anymore when bounds reached for ItemProgress --- src/LcdMenu.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/LcdMenu.h b/src/LcdMenu.h index e8cc58dd..34316e93 100644 --- a/src/LcdMenu.h +++ b/src/LcdMenu.h @@ -630,12 +630,13 @@ class LcdMenu { #endif #ifdef ItemProgress_H case MENU_ITEM_PROGRESS: { - if (isInEditMode()) { + if (isInEditMode() && item->getItemIndex() > MIN_PROGRESS) { item->decrement(); update(); // Log printCmd(F("LEFT"), item->getValue()); } + break; } #endif default: @@ -689,7 +690,7 @@ class LcdMenu { #endif #ifdef ItemProgress_H case MENU_ITEM_PROGRESS: { - if (isInEditMode()) { + if (isInEditMode() && item->getItemIndex() < MAX_PROGRESS) { item->increment(); update(); // Log