[longomatch] Pass the visitor/local team as visitor/local



commit 98b22ea1c885e79b786d73c6aa1e320ccca0a147
Author: Jorge Zapata <jorgeluis zapata gmail com>
Date:   Wed Apr 29 16:54:48 2015 +0200

    Pass the visitor/local team as visitor/local
    
    So far the visitor was passed as local to be shown correctly on the UI
    That leaded a bug of inverted active colors of teams

 LongoMatch.GUI/Gui/Dialog/SubstitutionsEditor.cs |   24 +++++++++++-----------
 1 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/LongoMatch.GUI/Gui/Dialog/SubstitutionsEditor.cs 
b/LongoMatch.GUI/Gui/Dialog/SubstitutionsEditor.cs
index 71732bd..f0487e1 100644
--- a/LongoMatch.GUI/Gui/Dialog/SubstitutionsEditor.cs
+++ b/LongoMatch.GUI/Gui/Dialog/SubstitutionsEditor.cs
@@ -107,7 +107,7 @@ namespace LongoMatch.Gui.Dialog
                        if (substitution.Team == TeamType.LOCAL) {
                                LoadTeams (project, hfp, hbp, null, null);
                        } else {
-                               LoadTeams (project, afp, abp, null, null);
+                               LoadTeams (project, null, null, afp, abp);
                        }
                        SwitchPlayer (substitution.In, substitution.Out);
                }
@@ -117,15 +117,17 @@ namespace LongoMatch.Gui.Dialog
                {
                        List<Player> homeTeamPlayers, awayTeamPlayers;
 
-                       homeTeamPlayers = homeFieldPlayers.Concat (homeBenchPlayers).ToList ();
-                       homeTeam = new Team {
-                               Colors = project.LocalTeamTemplate.Colors,
-                               ActiveColor = project.LocalTeamTemplate.ActiveColor,
-                               ID = project.LocalTeamTemplate.ID,
-                               Formation = project.LocalTeamTemplate.Formation,
-                               List = homeTeamPlayers
-                       };
-                       
+                       if (homeFieldPlayers != null) {
+                               homeTeamPlayers = homeFieldPlayers.Concat (homeBenchPlayers).ToList ();
+                               homeTeam = new Team {
+                                       Colors = project.LocalTeamTemplate.Colors,
+                                       ActiveColor = project.LocalTeamTemplate.ActiveColor,
+                                       ID = project.LocalTeamTemplate.ID,
+                                       Formation = project.LocalTeamTemplate.Formation,
+                                       List = homeTeamPlayers
+                               };
+                       }
+
                        if (awayFieldPlayers != null) {
                                awayTeamPlayers = awayFieldPlayers.Concat (awayBenchPlayers).ToList ();
                                awayTeam = new Team {
@@ -135,8 +137,6 @@ namespace LongoMatch.Gui.Dialog
                                        Formation = project.VisitorTeamTemplate.Formation,
                                        List = awayTeamPlayers
                                };
-                       } else {
-                               awayTeam = null;
                        }
 
                        tagger.LoadTeams (homeTeam, awayTeam, project.Dashboard.FieldBackground);


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