[longomatch] Draw objects in reverse order to match the selection



commit 0177c3939501c8adfc25ac1db1f59af3fa8f512e
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Tue May 27 18:46:06 2014 +0200

    Draw objects in reverse order to match the selection

 LongoMatch.Drawing/Canvas.cs |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/LongoMatch.Drawing/Canvas.cs b/LongoMatch.Drawing/Canvas.cs
index 3c1eca4..0dc7839 100644
--- a/LongoMatch.Drawing/Canvas.cs
+++ b/LongoMatch.Drawing/Canvas.cs
@@ -56,7 +56,8 @@ namespace LongoMatch.Drawing
                
                protected virtual void HandleDraw (object context, Area area) {
                        tk.Context = context;
-                       foreach (ICanvasObject o in Objects) {
+                       for (int i=Objects.Count - 1; i >= 0; i--) {
+                               ICanvasObject o = Objects[i];
                                if (o.Visible) {
                                        o.Draw (tk, area);
                                }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]