diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2011-09-28 02:21:06 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2011-09-28 02:21:06 +0000 |
| commit | 4de066bd0eafea75bd897dcc2313108f46d3dd8d (patch) | |
| tree | 1b85bd0f5f9765001f114c05057d14581c9c1b04 /fluid | |
| parent | b2399e393f305d3af90aa3b11f93dc83ea9a2766 (diff) | |
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
Diffstat (limited to 'fluid')
| -rw-r--r-- | fluid/Fl_Menu_Type.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
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")) |
