[longomatch] Do not notify twice for players selection



commit 68f954ed0c95f6c86d0c740baa8448a11bbc443a
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Mon Jul 7 12:46:44 2014 +0200

    Do not notify twice for players selection

 LongoMatch.Drawing/Widgets/TeamTagger.cs |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/LongoMatch.Drawing/Widgets/TeamTagger.cs b/LongoMatch.Drawing/Widgets/TeamTagger.cs
index 64b0640..72e2d55 100644
--- a/LongoMatch.Drawing/Widgets/TeamTagger.cs
+++ b/LongoMatch.Drawing/Widgets/TeamTagger.cs
@@ -101,7 +101,7 @@ namespace LongoMatch.Drawing.Widgets
                        ClearSelection ();
                        if (players != null) {
                                foreach (Player p in players) {
-                                       SelectPlayer (p);
+                                       SelectPlayer (p, false);
                                }
                        }
                        widget.ReDraw ();
@@ -109,7 +109,7 @@ namespace LongoMatch.Drawing.Widgets
 
                public void Select (Player p) {
                        ClearSelection ();
-                       SelectPlayer (p);
+                       SelectPlayer (p, false);
                        widget.ReDraw ();
                }
                
@@ -136,13 +136,13 @@ namespace LongoMatch.Drawing.Widgets
                        }
                }
                
-               void SelectPlayer (Player p)
+               void SelectPlayer (Player p, bool notify=true)
                {
                        if (p != null) {
                                ICanvasObject co = Objects.LastOrDefault (pl => (pl as 
PlayerObject).Player.ID == p.ID);
                                PlayerObject po = co as PlayerObject;
                                if (po != null) {
-                                       UpdateSelection (new Selection (po, SelectionPosition.All));
+                                       UpdateSelection (new Selection (po, SelectionPosition.All), notify);
                                }
                        }
                }


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