summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES2
-rw-r--r--documentation/Fl_Menu_.html3
-rw-r--r--src/Fl_Menu_.cxx3
3 files changed, 6 insertions, 2 deletions
diff --git a/CHANGES b/CHANGES
index 38dae6911..dfa4e57ca 100644
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,8 @@ CHANGES IN FLTK 1.1.7
- Documentation fixes (STR #648, STR #692, STR #730, STR
#744, STR #745)
+ - Removed flwaed attempt to find items via
+ Fl_Menu_::find_item() in linked submenus
- Fluid interactive window resizing fixe (STR #873, 791)
- Fluid panel resize and alignment fixes (STR #891)
- Fl_Window::show(argc, argv) now sets the scheme before
diff --git a/documentation/Fl_Menu_.html b/documentation/Fl_Menu_.html
index 2a94a7f82..d60228389 100644
--- a/documentation/Fl_Menu_.html
+++ b/documentation/Fl_Menu_.html
@@ -235,7 +235,8 @@ global()</TT> setting (so don't destroy the widget!)</P>
<p>Returns a pointer to the menu item with the given (full)
pathname. If no matching menu item can be found, a NULL pointer
-is returned.</p>
+is returned. This function does not search submenus that are linked
+via FL_SUBMENU_POINTER.</p>
<h4><a name=Fl_Menu_.item_pathname>int Fl_Menu_::item_pathname(char *name, int namelen ) const;</a><br>
int Fl_Menu_::item_pathname(char *name, int namelen,
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;