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:
Matthias Melcher
2011-09-28 02:21:06 +00:00
parent b2399e393f
commit 4de066bd0e
+3
View File
@@ -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"))