[longomatch] Keep original templates when importing a project



commit 47db02040938aeda5e4d64e27f4dfab574931c35
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Tue Apr 28 11:28:55 2015 +0200

    Keep original templates when importing a project

 LongoMatch.GUI/Gui/Panel/NewProjectPanel.cs |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/LongoMatch.GUI/Gui/Panel/NewProjectPanel.cs b/LongoMatch.GUI/Gui/Panel/NewProjectPanel.cs
index 8d137ad..a365d13 100644
--- a/LongoMatch.GUI/Gui/Panel/NewProjectPanel.cs
+++ b/LongoMatch.GUI/Gui/Panel/NewProjectPanel.cs
@@ -179,7 +179,7 @@ namespace LongoMatch.Gui.Panel
                        } else {
                                awayteamscombobox.Load (teams);
                                awayteamscombobox.Changed += (sender, e) => {
-                                       LoadTemplate (awayteamscombobox.ActiveTeam, TeamType.VISITOR, false);
+                                       LoadTemplate (awayteamscombobox.ActiveTeam.Clone (), 
TeamType.VISITOR, false);
                                };
                        }
 
@@ -188,7 +188,7 @@ namespace LongoMatch.Gui.Panel
                        } else {
                                hometeamscombobox.Load (teams);
                                hometeamscombobox.Changed += (sender, e) => {
-                                       LoadTemplate (hometeamscombobox.ActiveTeam, TeamType.LOCAL, false);
+                                       LoadTemplate (hometeamscombobox.ActiveTeam.Clone (), TeamType.LOCAL, 
false);
                                };
 
                        }
@@ -330,7 +330,7 @@ namespace LongoMatch.Gui.Panel
                void LoadTemplate (Team template, TeamType team, bool forceColor)
                {
                        if (team == TeamType.LOCAL) {
-                               hometemplate = Cloner.Clone (template);
+                               hometemplate = template;
                                hometacticsentry.Text = hometemplate.FormationStr;
                                SetButtonColor (homecolor1, hometemplate.Colors [0]);
                                SetButtonColor (homecolor2, hometemplate.Colors [1]);
@@ -342,7 +342,7 @@ namespace LongoMatch.Gui.Panel
                                        homecolor1button.Click ();
                                }
                        } else {
-                               awaytemplate = Cloner.Clone (template);
+                               awaytemplate = template;
                                awaytacticsentry.Text = awaytemplate.FormationStr;
                                SetButtonColor (awaycolor1, awaytemplate.Colors [0]);
                                SetButtonColor (awaycolor2, awaytemplate.Colors [1]);


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