From a802aaeb170e3c233c5d92ae29d8703a0b9c2768 Mon Sep 17 00:00:00 2001 From: James Palmer Date: Sun, 12 Dec 2021 14:55:20 -0700 Subject: Fluid: "Widget Class" subclasses Group but incorrectly shows Window subtypes. --- fluid/Fl_Widget_Type.cxx | 2 +- fluid/Fl_Window_Type.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/fluid/Fl_Widget_Type.cxx b/fluid/Fl_Widget_Type.cxx index 37cfa5fc3..d43832232 100644 --- a/fluid/Fl_Widget_Type.cxx +++ b/fluid/Fl_Widget_Type.cxx @@ -2442,7 +2442,7 @@ void Fl_Widget_Type::write_properties() { if (is_spinner() && ((Fl_Spinner*)o)->type() != ((Fl_Spinner*)tplate)->type()) { write_string("type"); write_word(item_name(subtypes(), ((Fl_Spinner*)o)->type())); - } else if (o->type() != tplate->type() || is_window()) { + } else if (subtypes() && (o->type() != tplate->type() || is_window())) { write_string("type"); write_word(item_name(subtypes(), o->type())); } diff --git a/fluid/Fl_Window_Type.h b/fluid/Fl_Window_Type.h index 4067d03f9..5868e2576 100644 --- a/fluid/Fl_Window_Type.h +++ b/fluid/Fl_Window_Type.h @@ -99,6 +99,9 @@ public: }; class Fl_Widget_Class_Type : private Fl_Window_Type { +protected: + Fl_Menu_Item* subtypes() {return 0;} + public: Fl_Widget_Class_Type() { write_public_state = 0; -- cgit v1.2.3