fix wrapping upwards in menu
rathnor rathnor
2 files changed,
5 insertions(+),
7 deletions(-)
M
ChangeLog
→
ChangeLog
@@ -1,6 +1,8 @@
(Format: Year/Month/Day) Changes for 0.9.10: *04/08/29: + * Fix cycling using keys in menus (didn't wrap upwards) (Simon) + FbTk/Menu.cc * Fix rendering bug when revisiting >1 column menus (Simon) FbTk/Menu.cc * Fix crash when extramenus not attached to windowmenu (Simon)
M
src/FbTk/Menu.cc
→
src/FbTk/Menu.cc
@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Menu.cc,v 1.76 2004/08/29 14:37:52 rathnor Exp $ +// $Id: Menu.cc,v 1.77 2004/08/29 14:53:23 rathnor Exp $ //use GNU extensions #ifndef _GNU_SOURCE@@ -300,11 +300,9 @@ true); // transp
} // restore old in case we changed which_press - which_press = old_which_press; + which_press = old_which_press + 1; if (!validIndex(which_press)) which_press = 0; - else - which_press++; if (menuitems[which_press] == 0) {@@ -340,12 +338,10 @@ true, // clear
true); // transp } // restore old in case we changed which_press - which_press = old_which_press; + which_press = old_which_press - 1; if (!validIndex(which_press)) which_press = menuitems.size() - 1; - else if (which_press - 1 >= 0) - which_press--; if (menuitems[which_press] == 0) { m_active_index = -1;