diff options
| author | James Palmer <jamasan@gmail.com> | 2021-12-12 14:55:20 -0700 |
|---|---|---|
| committer | Matthias Melcher <github@matthiasm.com> | 2021-12-13 12:06:07 +0100 |
| commit | a802aaeb170e3c233c5d92ae29d8703a0b9c2768 (patch) | |
| tree | 93488522c7dbf330f6e5af2d1027d680573ce08d /fluid | |
| parent | 3565aa1e60833a9e547a014081af5915a2e2732b (diff) | |
Fluid: "Widget Class" subclasses Group but incorrectly shows Window subtypes.
Diffstat (limited to 'fluid')
| -rw-r--r-- | fluid/Fl_Widget_Type.cxx | 2 | ||||
| -rw-r--r-- | fluid/Fl_Window_Type.h | 3 |
2 files changed, 4 insertions, 1 deletions
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; |
