[Menu] Selection not updated when rotary encoder left as first event

This commit is contained in:
Bertrand Songis
2020-09-04 20:21:01 +02:00
parent c547371caa
commit 417f40c755
+1 -1
View File
@@ -41,7 +41,7 @@ void MenuBody::onEvent(event_t event)
}
else if (event == EVT_ROTARY_LEFT) {
if (!lines.empty())
select(int(selectedIndex == 0 ? lines.size() - 1 : selectedIndex - 1));
select(int(selectedIndex <= 0 ? lines.size() - 1 : selectedIndex - 1));
}
else if (event == EVT_KEY_BREAK(KEY_ENTER)) {
if (!lines.empty()) {