1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Fixed a bug when selecting the first row in a ListBox after a key down event

This commit is contained in:
ed 2020-02-05 11:08:32 +00:00
parent 442478680b
commit b40496f568

View file

@ -723,7 +723,7 @@ bool ListBox::keyPressed (const KeyPress& key)
if (multiple)
selectRangeOfRows (lastRowSelected, lastRowSelected + 1);
else
selectRow (jmin (totalItems - 1, jmax (0, lastRowSelected) + 1));
selectRow (jmin (totalItems - 1, jmax (0, lastRowSelected + 1)));
}
else if (key.isKeyCode (KeyPress::pageUpKey))
{