mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 08:21:12 +02:00
- fix pagedown logic, but this time for real (i hope)
Why this was so difficult code? I don't know.
This commit is contained in:
@@ -546,13 +546,11 @@ int CBouquetList::show(bool bShowChannelList)
|
||||
if (!Bouquets.empty()) {
|
||||
int step = ((int) msg == g_settings.key_pagedown) ? listmaxshow : 1; // browse or step 1
|
||||
int new_selected = selected + step;
|
||||
if (new_selected >= (int) Bouquets.size()) {
|
||||
if (((Bouquets.size() - listmaxshow -1 < selected) && (step != 1)) || (selected != (Bouquets.size() - 1)))
|
||||
if (new_selected > (int) Bouquets.size() - 1) {
|
||||
if ((selected != Bouquets.size() - 1))
|
||||
new_selected = Bouquets.size() - 1;
|
||||
else if (((Bouquets.size() / listmaxshow) + 1) * listmaxshow == Bouquets.size() + listmaxshow) // last page has full entries
|
||||
new_selected = 0;
|
||||
else
|
||||
new_selected = ((step == (int) listmaxshow) && (new_selected < (int) (((Bouquets.size() / listmaxshow)+1) * listmaxshow))) ? (Bouquets.size() - 1) : 0;
|
||||
new_selected = 0;
|
||||
}
|
||||
updateSelection(new_selected);
|
||||
}
|
||||
|
Reference in New Issue
Block a user