From: jpbruyere Date: Mon, 15 Feb 2016 13:04:52 +0000 (+0100) Subject: test mouse is in in reverse order X-Git-Tag: v0.4~127^2~21 X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=2def04e1eec8b2ae2ee1cf952a2975f8ca6e8b05;p=jp%2Fcrow.git test mouse is in in reverse order --- 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()