From d7a34f00617967375cdc8b26b34d72c4ef13ef6d Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Tue, 15 May 2007 07:42:53 +0000 Subject: 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 --- CHANGES | 2 ++ FL/Fl_Input_Choice.H | 2 ++ 2 files changed, 4 insertions(+) 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(); } -- cgit v1.2.3