summaryrefslogtreecommitdiff
path: root/src/Fl_Menu_Bar.cxx
diff options
context:
space:
mode:
authorBill Spitzak <spitzak@gmail.com>2000-07-30 00:31:44 +0000
committerBill Spitzak <spitzak@gmail.com>2000-07-30 00:31:44 +0000
commit797d78d86c4ce3bc830b5fcd30ac5a6c73d0ee42 (patch)
tree0b2e562b1316fc5a2bcaace85f1a1857e9a3f94d /src/Fl_Menu_Bar.cxx
parent9bfbc26899e98167ba6874acd2067c5d405ee93c (diff)
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
Diffstat (limited to 'src/Fl_Menu_Bar.cxx')
-rw-r--r--src/Fl_Menu_Bar.cxx13
1 files changed, 7 insertions, 6 deletions
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 $".
//