mirror of
https://github.com/fltk/fltk.git
synced 2026-09-28 15:55:22 +08:00
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
This commit is contained in:
@@ -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"))
|
||||
|
||||
Reference in New Issue
Block a user