[longomatch/newui: 98/157] Fix infinite bucle in the drawing tool



commit 89e8c7de0c1eebf4bacf85cf8c737490ddebb5ed
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Tue Aug 26 18:09:40 2014 +0200

    Fix infinite bucle in the drawing tool

 LongoMatch.Drawing/Canvas.cs                   |   14 +++++++-------
 LongoMatch.Drawing/Widgets/Blackboard.cs       |    2 +-
 LongoMatch.Drawing/Widgets/CategoriesLabels.cs |    2 +-
 LongoMatch.Drawing/Widgets/Dashboard.cs        |    2 +-
 LongoMatch.Drawing/Widgets/PlaysTimeline.cs    |    2 +-
 LongoMatch.Drawing/Widgets/PositionTagger.cs   |    4 ++--
 LongoMatch.Drawing/Widgets/TimersTimeline.cs   |    2 +-
 7 files changed, 14 insertions(+), 14 deletions(-)
---
diff --git a/LongoMatch.Drawing/Canvas.cs b/LongoMatch.Drawing/Canvas.cs
index 02f3773..d52326e 100644
--- a/LongoMatch.Drawing/Canvas.cs
+++ b/LongoMatch.Drawing/Canvas.cs
@@ -62,20 +62,20 @@ namespace LongoMatch.Drawing
                protected virtual void Dispose (bool disposing)
                {
                        if (disposing) {
-                               Clear ();
+                               ClearObjects ();
                                Objects = null;
                                disposed = true;
                        }
                }
 
-               protected void Clear ()
+               protected void ClearObjects ()
                {
-                               if (Objects != null) {
-                                       foreach (CanvasObject co in Objects) {
-                                               co.Dispose ();
-                                       }
+                       if (Objects != null) {
+                               foreach (CanvasObject co in Objects) {
+                                       co.Dispose ();
                                }
-                               Objects.Clear ();
+                       }
+                       Objects.Clear ();
                }
 
                public List<ICanvasObject> Objects {
diff --git a/LongoMatch.Drawing/Widgets/Blackboard.cs b/LongoMatch.Drawing/Widgets/Blackboard.cs
index 61ff3ea..9ca95e0 100644
--- a/LongoMatch.Drawing/Widgets/Blackboard.cs
+++ b/LongoMatch.Drawing/Widgets/Blackboard.cs
@@ -130,7 +130,7 @@ namespace LongoMatch.Drawing.Widgets
                public void Clear (bool resetDrawing = true)
                {
                        ClearSelection ();
-                       Clear ();
+                       ClearObjects ();
                        if (drawing != null && resetDrawing) {
                                drawing.Drawables.Clear ();
                        }
diff --git a/LongoMatch.Drawing/Widgets/CategoriesLabels.cs b/LongoMatch.Drawing/Widgets/CategoriesLabels.cs
index 6a43d5c..3de8762 100644
--- a/LongoMatch.Drawing/Widgets/CategoriesLabels.cs
+++ b/LongoMatch.Drawing/Widgets/CategoriesLabels.cs
@@ -47,7 +47,7 @@ namespace LongoMatch.Drawing.Widgets
 
                public void LoadProject (Project project, PlaysFilter filter)
                {
-                       Clear ();
+                       ClearObjects ();
                        this.project = project;
                        this.filter = filter;
                        if (project != null) {
diff --git a/LongoMatch.Drawing/Widgets/Dashboard.cs b/LongoMatch.Drawing/Widgets/Dashboard.cs
index f53e05d..9ce9bee 100644
--- a/LongoMatch.Drawing/Widgets/Dashboard.cs
+++ b/LongoMatch.Drawing/Widgets/Dashboard.cs
@@ -188,7 +188,7 @@ namespace LongoMatch.Drawing.Widgets
 
                void LoadTemplate ()
                {
-                       Clear ();
+                       ClearObjects ();
                        foreach (TagButton tag in template.CommonTags) {
                                TagObject to = new TagObject (tag);
                                to.ClickedEvent += HandleTaggerClickedEvent;
diff --git a/LongoMatch.Drawing/Widgets/PlaysTimeline.cs b/LongoMatch.Drawing/Widgets/PlaysTimeline.cs
index 591810b..c754ddd 100644
--- a/LongoMatch.Drawing/Widgets/PlaysTimeline.cs
+++ b/LongoMatch.Drawing/Widgets/PlaysTimeline.cs
@@ -49,7 +49,7 @@ namespace LongoMatch.Drawing.Widgets
                public void LoadProject (Project project, PlaysFilter filter)
                {
                        this.project = project;
-                       Clear ();
+                       ClearObjects ();
                        categories.Clear ();
                        duration = project.Description.File.Duration;
                        widget.Height = project.Categories.CategoriesList.Count * 
StyleConf.TimelineCategoryHeight;
diff --git a/LongoMatch.Drawing/Widgets/PositionTagger.cs b/LongoMatch.Drawing/Widgets/PositionTagger.cs
index 645e19c..72cfcb8 100644
--- a/LongoMatch.Drawing/Widgets/PositionTagger.cs
+++ b/LongoMatch.Drawing/Widgets/PositionTagger.cs
@@ -78,14 +78,14 @@ namespace LongoMatch.Drawing.Widgets
 
                public List<Point> Points {
                        set {
-                               Clear ();
+                               ClearObjects ();
                                Objects.Add (new PositionObject (value, Background.Width, Background.Height));
                        }
                }
 
                public List<Play> Plays {
                        set {
-                               Clear ();
+                               ClearObjects ();
                                foreach (Play p in value) {
                                        AddPlay (p);
                                }
diff --git a/LongoMatch.Drawing/Widgets/TimersTimeline.cs b/LongoMatch.Drawing/Widgets/TimersTimeline.cs
index 4d8cb42..9a3c54c 100644
--- a/LongoMatch.Drawing/Widgets/TimersTimeline.cs
+++ b/LongoMatch.Drawing/Widgets/TimersTimeline.cs
@@ -32,7 +32,7 @@ namespace LongoMatch.Drawing.Widgets
 
                public void LoadTimers (List<Timer> timers, Time duration, bool splitTimers = true)
                {
-                       Clear ();
+                       ClearObjects ();
                        this.timers = new Dictionary<Timer, TimerTimeline> ();
                        this.duration = duration;
                        FillCanvas (timers, splitTimers);


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