From 0776a13841d983d5464326bc2cd26bee13caa00f Mon Sep 17 00:00:00 2001 From: Maschell Date: Sat, 22 Feb 2020 21:17:09 +0100 Subject: [PATCH] Buttons are no longer holdable when the screen is scrolling --- src/gui/GuiIconGrid.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/gui/GuiIconGrid.cpp b/src/gui/GuiIconGrid.cpp index 8692c32..1e42a15 100644 --- a/src/gui/GuiIconGrid.cpp +++ b/src/gui/GuiIconGrid.cpp @@ -583,10 +583,17 @@ void GuiIconGrid::updateButtonPositions() { uint32_t endPage = startPage; if(targetLeftPosition != currentLeftPosition) { + for (auto const& x : vec) { + x.second->button->setHoldable(false); + } endPage++; if(endPage > pages) { endPage = pages; } + }else{ + for (auto const& x : vec) { + x.second->button->setHoldable(true); + } } for(uint32_t i = startPage * (MAX_COLS * MAX_ROWS); i < (endPage + 1) * (MAX_COLS * MAX_ROWS); i++) {