From f33257521bf80dcef8575c4fc3ddaf4a40ff588a Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 7 Jun 2009 18:13:15 +0000 Subject: fixed a few widget order problems, changed map targetting behaviour --- src/ui/widget.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/ui/widget.cc') diff --git a/src/ui/widget.cc b/src/ui/widget.cc index 15fa10f..cc53c9f 100644 --- a/src/ui/widget.cc +++ b/src/ui/widget.cc @@ -47,12 +47,15 @@ void Widget::remove_children() widget_children.clear(); } -size_t Widget::list(const size_t indent) const +size_t Widget::list(const size_t indent, const bool visible_only) const { + if (visible_only && !visible()) + return 0; + print(indent); size_t n = 1; for (Children::const_iterator it = widget_children.begin(); it != widget_children.end(); it++) { - n += (*it)->list(indent+1); + n += (*it)->list(indent+1, visible_only); } return n; } -- cgit v1.2.3