From 2c6367a0e6d8bbe3d7df248c550b37b8744f20fe Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Wed, 21 May 2003 01:37:17 +0000 Subject: Fix menu scrolling (STR #33) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2990 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- CHANGES | 3 +++ src/Fl_Menu.cxx | 7 ++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index eefe76919..116c56f77 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,8 @@ CHANGES IN FLTK 1.1.4 + - Long menus that were aligned such that the top of an + item was exactly at the top of the screen would not + scroll (STR #33) - The OS issues appendix incorrectly stated that MacOS 8.6 and 9 were supported; they are not (STR #28) - Fixed handling of nested double-buffered windows (STR diff --git a/src/Fl_Menu.cxx b/src/Fl_Menu.cxx index ce2bb6d25..2076bf10f 100644 --- a/src/Fl_Menu.cxx +++ b/src/Fl_Menu.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Menu.cxx,v 1.18.2.12.2.24 2003/05/18 22:12:20 easysw Exp $" +// "$Id: Fl_Menu.cxx,v 1.18.2.12.2.25 2003/05/21 01:37:17 easysw Exp $" // // Menu code for the Fast Light Tool Kit (FLTK). // @@ -564,7 +564,8 @@ int menuwindow::handle(int e) { if (item >= 0) break; if (mymenu <= 0) break; } - setitem(mymenu, item); + if (my == 0 && item > 0) setitem(mymenu, item - 1); + else setitem(mymenu, item); if (e == FL_PUSH) { if (pp.current_item && pp.current_item->submenu() // this is a menu title && item != pp.p[mymenu]->selected // and it is not already on @@ -790,5 +791,5 @@ const Fl_Menu_Item* Fl_Menu_Item::test_shortcut() const { } // -// End of "$Id: Fl_Menu.cxx,v 1.18.2.12.2.24 2003/05/18 22:12:20 easysw Exp $". +// End of "$Id: Fl_Menu.cxx,v 1.18.2.12.2.25 2003/05/21 01:37:17 easysw Exp $". // -- cgit v1.2.3