]> O.S.I.I.S - jp/crow.git/commitdiff
test mouse is in in reverse order
authorjpbruyere <jp.bruyere@hotmail.com>
Mon, 15 Feb 2016 13:04:52 +0000 (14:04 +0100)
committerjpbruyere <jp.bruyere@hotmail.com>
Mon, 15 Feb 2016 13:04:52 +0000 (14:04 +0100)
src/GraphicObjects/Group.cs

index cb9ac8468bf67bd3f8d2ef30e8135f16237674be..12d8c7058dea884b3bca000874c0bee09a9e9b8d 100644 (file)
@@ -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()