Permalink
Browse files

visibility handling

  • Loading branch information...
cail committed Jan 28, 2013
1 parent 50522b0 commit 4e943f064136336caaedc12bd14cf332e403a8ca
Showing with 2 additions and 2 deletions.
  1. +2 −2 Fleux/UIElements/UIElement.cs
@@ -313,7 +313,7 @@ public virtual void ResizeForWidth(int width)
protected virtual bool TraverseHandle(Point start, Func<UIElement, bool> elementHandler)
{
bool handled = false;
- foreach (var el in this.Children.Where(x => x.Bounds.Contains(start)).Reverse())
+ foreach (var el in this.Children.Where(x => x.Visible && x.Bounds.Contains(start)).Reverse())
{
if (elementHandler(el))
{
@@ -327,7 +327,7 @@ protected virtual bool TraverseHandle(Point start, Func<UIElement, bool> element
protected virtual UIElement TraverseHandle(Point start, Func<UIElement, UIElement> elementHandler)
{
UIElement handled = null;
- foreach (var el in this.Children.Where(x => x.Bounds.Contains(start)).Reverse())
+ foreach (var el in this.Children.Where(x => x.Visible && x.Bounds.Contains(start)).Reverse())
{
handled = elementHandler(el);
if (handled != null)

0 comments on commit 4e943f0

Please sign in to comment.