summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/FbTk/Menu.cc10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/FbTk/Menu.cc b/src/FbTk/Menu.cc
index b4ae45a..7e89016 100644
--- a/src/FbTk/Menu.cc
+++ b/src/FbTk/Menu.cc
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Menu.cc,v 1.76 2004/08/29 14:37:52 rathnor Exp $ 25// $Id: Menu.cc,v 1.77 2004/08/29 14:53:23 rathnor Exp $
26 26
27//use GNU extensions 27//use GNU extensions
28#ifndef _GNU_SOURCE 28#ifndef _GNU_SOURCE
@@ -300,11 +300,9 @@ void Menu::nextItem() {
300 } 300 }
301 301
302 // restore old in case we changed which_press 302 // restore old in case we changed which_press
303 which_press = old_which_press; 303 which_press = old_which_press + 1;
304 if (!validIndex(which_press)) 304 if (!validIndex(which_press))
305 which_press = 0; 305 which_press = 0;
306 else
307 which_press++;
308 306
309 307
310 if (menuitems[which_press] == 0) { 308 if (menuitems[which_press] == 0) {
@@ -340,12 +338,10 @@ void Menu::prevItem() {
340 true); // transp 338 true); // transp
341 } 339 }
342 // restore old in case we changed which_press 340 // restore old in case we changed which_press
343 which_press = old_which_press; 341 which_press = old_which_press - 1;
344 342
345 if (!validIndex(which_press)) 343 if (!validIndex(which_press))
346 which_press = menuitems.size() - 1; 344 which_press = menuitems.size() - 1;
347 else if (which_press - 1 >= 0)
348 which_press--;
349 345
350 if (menuitems[which_press] == 0) { 346 if (menuitems[which_press] == 0) {
351 m_active_index = -1; 347 m_active_index = -1;