[longomatch] Only emit the teams changed signal when a player changed in the list



commit 907949fd145ea29498dd380427d8a27947ed584a
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Fri Feb 6 15:42:58 2015 +0100

    Only emit the teams changed signal when a player changed in the list

 LongoMatch.GUI/Gui/TreeView/ListTreeViewBase.cs |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/LongoMatch.GUI/Gui/TreeView/ListTreeViewBase.cs b/LongoMatch.GUI/Gui/TreeView/ListTreeViewBase.cs
index aad35b0..8a08ab1 100644
--- a/LongoMatch.GUI/Gui/TreeView/ListTreeViewBase.cs
+++ b/LongoMatch.GUI/Gui/TreeView/ListTreeViewBase.cs
@@ -153,8 +153,13 @@ namespace LongoMatch.Gui.Component
 
                void HandleEditPlayEvent (object sender, EventArgs e)
                {
+                       List<Player> players = SelectedPlay.Players.ToList ();
+
                        Config.GUIToolkit.EditPlay (SelectedPlay, Project, true, true, true, true);
-                       Config.EventsBroker.EmitTeamTagsChanged ();
+
+                       if (!Enumerable.SequenceEqual (players, SelectedPlay.Players)) {
+                               Config.EventsBroker.EmitTeamTagsChanged ();
+                       }
                }
 
                protected void OnFilterUpdated ()


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