From 4de066bd0eafea75bd897dcc2313108f46d3dd8d Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Wed, 28 Sep 2011 02:21:06 +0000 Subject: STR 2706: fixed wrong parent() count for Fluid generated Fl_Input_Choice callback code. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9069 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- fluid/Fl_Menu_Type.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fluid/Fl_Menu_Type.cxx b/fluid/Fl_Menu_Type.cxx index ec02ad9ae..303b5c9ed 100644 --- a/fluid/Fl_Menu_Type.cxx +++ b/fluid/Fl_Menu_Type.cxx @@ -205,6 +205,9 @@ void Fl_Menu_Item_Type::write_static() { write_c(" ((%s*)(o", k); Fl_Type* t = parent; while (t->is_menu_item()) t = t->parent; Fl_Type *q = 0; + // Go up one more level for Fl_Input_Choice, as these are groups themselves + if (t && !strcmp(t->type_name(), "Fl_Input_Choice")) + write_c("->parent()"); for (t = t->parent; t && t->is_widget() && !is_class(); q = t, t = t->parent) write_c("->parent()"); if (!q || strcmp(q->type_name(), "widget_class")) -- cgit v1.2.3