summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fluid/Fl_Menu_Type.cxx3
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"))