From 7c143c6bfb3f8250211c00e22659f4239736d88a Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Tue, 31 May 2005 20:05:50 +0000 Subject: Fl_Menu_::find_item() was trying to search through submenus created with FL_SUBMENU_POINTER (vs. Fl_SUBMENU and an array of submenu items), but not following the pointer, messing up the search string. Two fixes were possible: correctly searching linked submenus, or disabeling submenu links alltogether. I decided for the later since the use of FL_SUBMENU_POINTER implies that the user knows the pointer and can search that submenu seperately, saving time when searching the main menu. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4384 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Menu_.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Fl_Menu_.cxx b/src/Fl_Menu_.cxx index e7db7ed9b..4b1edb4e1 100644 --- a/src/Fl_Menu_.cxx +++ b/src/Fl_Menu_.cxx @@ -88,8 +88,9 @@ Fl_Menu_::find_item(const char *name) for ( int t=0; t < size(); t++ ) { Fl_Menu_Item *m = menu_ + t; - if (m->submenu()) { + if (m->flags&FL_SUBMENU) { // IT'S A SUBMENU + // we do not support searches through FL_SUBMENU_POINTER links if (menupath[0]) strlcat(menupath, "/", sizeof(menupath)); strlcat(menupath, m->label(), sizeof(menupath)); if (!strcmp(menupath, name)) return m; -- cgit v1.2.3