diff options
author | Stijn Buys <ingar@osirion.org> | 2008-10-12 17:27:00 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-10-12 17:27:00 +0000 |
commit | 574bf11742c40203a4433c0b69264014b10b5a96 (patch) | |
tree | 5fdaa40d22c38e5d8cce47d43a1a892008322598 /src/ui/widget.cc | |
parent | b417df720584c101f3799874a0c836a543a8d0a8 (diff) |
container widget
Diffstat (limited to 'src/ui/widget.cc')
-rw-r--r-- | src/ui/widget.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ui/widget.cc b/src/ui/widget.cc index e17e5ab..1ecfcc8 100644 --- a/src/ui/widget.cc +++ b/src/ui/widget.cc @@ -223,7 +223,9 @@ void Widget::remove_child(Widget *child) { Children::iterator it = find_child(child); if (it != widget_children.end()) { - delete(*it); + Widget *w = (*it); + w->widget_parent = 0; + delete(w); widget_children.erase(it); } } @@ -323,10 +325,10 @@ void Widget::event_draw() void Widget::event_resize() { - resize(); for (Children::iterator it = widget_children.begin(); it != widget_children.end(); it++) { (*it)->event_resize(); } + resize(); } /* -- event handlers ----------------------------------------------- */ |