|
|
commit a802aaeb170e3c233c5d92ae29d8703a0b9c2768
Author: James Palmer <jamasan@gmail.com>
AuthorDate: Sun Dec 12 14:55:20 2021 -0700
Commit: Matthias Melcher <github@matthiasm.com>
CommitDate: Mon Dec 13 12:06:07 2021 +0100
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 fluid/Fl_Widget_Type.cxx fluid/Fl_Widget_Type.cxx
index 37cfa5f..d438322 100644
--- fluid/Fl_Widget_Type.cxx
+++ 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 fluid/Fl_Window_Type.h fluid/Fl_Window_Type.h
index 4067d03..5868e25 100644
--- fluid/Fl_Window_Type.h
+++ 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;
[ Direct Link to Message ] | |
|
| |