From 2def04e1eec8b2ae2ee1cf952a2975f8ca6e8b05 Mon Sep 17 00:00:00 2001 From: jpbruyere Date: Mon, 15 Feb 2016 14:04:52 +0100 Subject: [PATCH] test mouse is in in reverse order --- src/GraphicObjects/Group.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/GraphicObjects/Group.cs b/src/GraphicObjects/Group.cs index cb9ac846..12d8c705 100644 --- a/src/GraphicObjects/Group.cs +++ b/src/GraphicObjects/Group.cs @@ -274,11 +274,10 @@ namespace Crow HostContainer.hoverWidget = this; onMouseEnter (this, e); } - foreach (GraphicObject g in Children) - { - if (g.MouseIsIn(e.Position)) + for (int i = Children.Count - 1; i >= 0; i--) { + if (Children[i].MouseIsIn(e.Position)) { - g.checkHoverWidget (e); + Children[i].checkHoverWidget (e); return; } } @@ -286,6 +285,7 @@ namespace Crow } #endregion + #region IXmlSerializable public override System.Xml.Schema.XmlSchema GetSchema() -- 2.47.3