From 504ba253d4d4fa021f0e67afbf093629c733ed86 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Thu, 18 Jan 2007 11:28:47 +0000 Subject: Fixed Scroll crash in Fluid Live Mode (STR #1524) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5609 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- fluid/Fl_Group_Type.cxx | 16 ++++++++++++++++ fluid/Fl_Type.h | 1 + 2 files changed, 17 insertions(+) (limited to 'fluid') diff --git a/fluid/Fl_Group_Type.cxx b/fluid/Fl_Group_Type.cxx index 9dda8b5a3..3e6c8e3d6 100644 --- a/fluid/Fl_Group_Type.cxx +++ b/fluid/Fl_Group_Type.cxx @@ -278,6 +278,22 @@ void Fl_Group_Type::copy_properties() { const char scroll_type_name[] = "Fl_Scroll"; +Fl_Widget *Fl_Scroll_Type::enter_live_mode(int top) { + Fl_Group *grp = new Fl_Scroll(o->x(), o->y(), o->w(), o->h()); + grp->show(); + live_widget = grp; + if (live_widget) { + copy_properties(); + Fl_Type *n; + for (n = next; n && n->level > level; n = n->next) { + if (n->level == level+1) + n->enter_live_mode(); + } + grp->end(); + } + return live_widget; +} + Fl_Menu_Item scroll_type_menu[] = { {"BOTH", 0, 0, 0/*(void*)Fl_Scroll::BOTH*/}, {"HORIZONTAL", 0, 0, (void*)Fl_Scroll::HORIZONTAL}, diff --git a/fluid/Fl_Type.h b/fluid/Fl_Type.h index 21ee85f5b..f5a18d831 100644 --- a/fluid/Fl_Type.h +++ b/fluid/Fl_Type.h @@ -441,6 +441,7 @@ public: virtual const char *type_name() {return scroll_type_name;} Fl_Widget_Type *_make() {return new Fl_Scroll_Type();} int pixmapID() { return 19; } + Fl_Widget *enter_live_mode(int top=0); void copy_properties(); }; -- cgit v1.2.3