From 1968230641bcf1084f86d40b2859e519adfae66f Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 27 Jul 2020 23:42:13 +0200 Subject: [PATCH] psisetup: avoid cursor on last item Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/25c79afcc31ecf4a821d19ff6eded53222a5a676 Author: vanhofen Date: 2020-07-27 (Mon, 27 Jul 2020) Origin message was: ------------------ - psisetup: avoid cursor on last item --- src/gui/psisetup.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/psisetup.cpp b/src/gui/psisetup.cpp index 383d7e49e..e0677f988 100644 --- a/src/gui/psisetup.cpp +++ b/src/gui/psisetup.cpp @@ -154,7 +154,7 @@ int CPSISetup::exec (CMenuTarget * parent, const std::string &) psi_list[i].y = y + locHeight * i + i * 2; psi_list[i].xBox = psi_list[i].x + SLIDERWIDTH + LOCGAP; psi_list[i].yBox = psi_list[i].y; - psi_list[i].xLoc = psi_list[i].x + SLIDERWIDTH + LOCGAP + 2; + psi_list[i].xLoc = psi_list[i].x + SLIDERWIDTH + LOCGAP + OFFSET_INNER_SMALL; psi_list[i].yLoc = psi_list[i].y + locHeight - 1; } @@ -193,7 +193,7 @@ int CPSISetup::exec (CMenuTarget * parent, const std::string &) direction = -1; /* fall through */ case CRCInput::RC_down: - if (selected + direction > -1 && selected + direction < PSI_SCALE_COUNT) + if (selected + direction > -1 && selected + direction < (PSI_SCALE_COUNT - 1)) { psi_list[selected].selected = false; paintSlider (selected);