[longomatch/newui: 94/157] Fix exception un plays lists showing menus



commit b2194ab32260e25ad15154d08fc33538e8f82a34
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Tue Aug 26 16:47:41 2014 +0200

    Fix exception un plays lists showing menus

 LongoMatch.Drawing/Widgets/PlaysTimeline.cs |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/LongoMatch.Drawing/Widgets/PlaysTimeline.cs b/LongoMatch.Drawing/Widgets/PlaysTimeline.cs
index e9afbcb..591810b 100644
--- a/LongoMatch.Drawing/Widgets/PlaysTimeline.cs
+++ b/LongoMatch.Drawing/Widgets/PlaysTimeline.cs
@@ -148,15 +148,15 @@ namespace LongoMatch.Drawing.Widgets
                                }
                        }
                        
-                       for (i = i; i < cats.Count; i++) {
+                       for (int j = 0; j < cats.Count; j++) {
                                AnalysisCategory cat;
-                               cat = cats [i];
+                               cat = cats [j];
                                tl = new CategoryTimeline (project.PlaysInCategory (cat), duration,
                                                           i * StyleConf.TimelineCategoryHeight,
                                                           ColorForRow (i));
                                categories [cat] = tl;
                                Objects.Add (tl);
-                               Console.WriteLine (i);
+                               i++;
                        }
 
                        UpdateVisibleCategories ();
@@ -223,10 +223,9 @@ namespace LongoMatch.Drawing.Widgets
                        foreach (AnalysisCategory ac in categories.Keys) {
                                TimelineObject tl;
                                Category c = ac as Category;
-                               if (ac == null)
+                               if (c == null)
                                        continue;
-                               
-                       
+
                                tl = categories [c];
                                if (!tl.Visible)
                                        continue;


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