From 797d78d86c4ce3bc830b5fcd30ac5a6c73d0ee42 Mon Sep 17 00:00:00 2001 From: Bill Spitzak Date: Sun, 30 Jul 2000 00:31:44 +0000 Subject: Shortcuts for "buttons" in a Fl_Menu_Bar work again. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1267 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Menu_Bar.cxx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/Fl_Menu_Bar.cxx') diff --git a/src/Fl_Menu_Bar.cxx b/src/Fl_Menu_Bar.cxx index 82d2efb89..886467ef7 100644 --- a/src/Fl_Menu_Bar.cxx +++ b/src/Fl_Menu_Bar.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Menu_Bar.cxx,v 1.7.2.3 2000/07/11 05:36:39 spitzak Exp $" +// "$Id: Fl_Menu_Bar.cxx,v 1.7.2.4 2000/07/30 00:31:44 spitzak Exp $" // // Menu bar widget for the Fast Light Tool Kit (FLTK). // @@ -50,14 +50,15 @@ int Fl_Menu_Bar::handle(int event) { picked(v); return 1; case FL_SHORTCUT: - if (visible_r()) {if ((v = menu()->find_shortcut())) goto J1;} - v = menu()->test_shortcut(); - if (v) {picked(v); return 1;} - return 0; + if (visible_r()) { + v = menu()->find_shortcut(); + if (v && v->submenu()) goto J1; + } + return test_shortcut() != 0; } return 0; } // -// End of "$Id: Fl_Menu_Bar.cxx,v 1.7.2.3 2000/07/11 05:36:39 spitzak Exp $". +// End of "$Id: Fl_Menu_Bar.cxx,v 1.7.2.4 2000/07/30 00:31:44 spitzak Exp $". // -- cgit v1.2.3