From 2459b5e00d69c8b2f3ecbce5f64fe9bc4c8efcc1 Mon Sep 17 00:00:00 2001 From: Mark Calderbank Date: Fri, 27 Jan 2006 00:32:05 +0000 Subject: [PATCH] WSelectList: Make 'page down' skip to end if no next page exists --- wselectlist.cc | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/wselectlist.cc b/wselectlist.cc index 9942ff5..ec535b0 100644 --- a/wselectlist.cc +++ b/wselectlist.cc @@ -181,10 +181,15 @@ void WSelectList::pageUp() void WSelectList::pageDown() { - if ((topOption + numOptionsDisplayable) >= options.size()) return; - - topOption += numOptionsDisplayable; - selectedOption = topOption; + if ((topOption + numOptionsDisplayable) >= options.size()) + { + selectedOption = options.size() - 1; + } + else + { + topOption += numOptionsDisplayable; + selectedOption = topOption; + } } int WSelectList::getTopOption() -- 2.39.5