summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2007-05-15 07:42:53 +0000
committerMatthias Melcher <fltk@matthiasm.com>2007-05-15 07:42:53 +0000
commitd7a34f00617967375cdc8b26b34d72c4ef13ef6d (patch)
tree9f0a088d1b2c54b7fdd9a543266bc7346e25986f
parente37b4526fc387b98939bf9b69be85db0daf0d5d3 (diff)
Fixed possible selection of submenu items in FL_INput_Choice (STR 1676)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5831 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--CHANGES2
-rw-r--r--FL/Fl_Input_Choice.H2
2 files changed, 4 insertions, 0 deletions
diff --git a/CHANGES b/CHANGES
index 49966ad2b..708e084ae 100644
--- a/CHANGES
+++ b/CHANGES
@@ -3,6 +3,8 @@ CHANGES IN FLTK 1.1.8
- Documentation fixes (STR #1454, STR #1455, STR #1456,
STR #1457, STR #1458, STR #1460, STR #1481, STR #1578,
STR #1639, STR #1645, STR #1644)
+ - Fixed selection of submenu items in
+ input_choice (STR #1676)
- Fixed calculation of stride for image scaling and
color manipulation (STR #1673)
- Made -O3 the default optimization on Cygwin/Mingw since
diff --git a/FL/Fl_Input_Choice.H b/FL/Fl_Input_Choice.H
index 344827ed1..45fbe70db 100644
--- a/FL/Fl_Input_Choice.H
+++ b/FL/Fl_Input_Choice.H
@@ -59,6 +59,8 @@ class Fl_Input_Choice : public Fl_Group {
static void menu_cb(Fl_Widget*, void *data) {
Fl_Input_Choice *o=(Fl_Input_Choice *)data;
+ const Fl_Menu_Item *item = o->menubutton()->mvalue();
+ if ( item && item->flags & (FL_SUBMENU|FL_SUBMENU_POINTER) ) return; // ignore submenus
o->inp_->value(o->menu_->text());
o->do_callback();
}