Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2009-06-07 18:13:15 +0000
committerStijn Buys <ingar@osirion.org>2009-06-07 18:13:15 +0000
commitf33257521bf80dcef8575c4fc3ddaf4a40ff588a (patch)
tree5e3a112e814478ba3ab624e0867761654a5ea0a4 /src/ui/widget.cc
parent5b94df1df2707b36401d91d80b92d0e4cdfd2277 (diff)
fixed a few widget order problems, changed map targetting behaviour
Diffstat (limited to 'src/ui/widget.cc')
-rw-r--r--src/ui/widget.cc7
1 files changed, 5 insertions, 2 deletions
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;
}