diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2007-01-18 11:28:47 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2007-01-18 11:28:47 +0000 |
| commit | 504ba253d4d4fa021f0e67afbf093629c733ed86 (patch) | |
| tree | fc127941a74b751d0a593201c7c35149b6413096 /fluid | |
| parent | 01af5901b024dbf6db543feea3ac2a783089ce3b (diff) | |
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
Diffstat (limited to 'fluid')
| -rw-r--r-- | fluid/Fl_Group_Type.cxx | 16 | ||||
| -rw-r--r-- | fluid/Fl_Type.h | 1 |
2 files changed, 17 insertions, 0 deletions
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(); }; |
