fix checkSelected
All checks were successful
/ Build & Publish (push) Successful in 52s

This commit is contained in:
Daniella / Tove 2024-06-25 07:21:49 +02:00
parent 5044570037
commit 7ec3cf005b
Signed by: TudbuT
GPG key ID: B3CF345217F202D3

View file

@ -57,13 +57,13 @@ public class CBWindow extends JFrame implements WindowListener {
int max = 0;
while (list.get(selected).callback == null) {
if(wasMovingUp) {
if(selected-- == 0) {
if(--selected < 0) {
selected++;
wasMovingUp = false;
}
}
else {
if(selected++ == list.size()) {
if(--selected == list.size()) {
selected--;
wasMovingUp = true;
}