[longomatch/statebar: 2/13] Revert "Use Add instead of insert with bad indexes"



commit 5de8764b95885b048260cd129881c98a3bc17780
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Fri Sep 16 00:18:11 2011 +0200

    Revert "Use Add instead of insert with bad indexes"
    
    This reverts commit a8656e9b100eab2b710c1db91949d25f03f9e35b.

 LongoMatch/Store/Templates/CategoriesTemplate.cs |    2 +-
 LongoMatch/Store/Templates/TeamTemplate.cs       |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/LongoMatch/Store/Templates/CategoriesTemplate.cs b/LongoMatch/Store/Templates/CategoriesTemplate.cs
index 7d98ed9..7a28538 100644
--- a/LongoMatch/Store/Templates/CategoriesTemplate.cs
+++ b/LongoMatch/Store/Templates/CategoriesTemplate.cs
@@ -100,7 +100,7 @@ namespace LongoMatch.Store.Templates
 			cat.SubCategories.Add(localplayers);
 			cat.SubCategories.Add(visitorplayers);
 			cat.SubCategories.Add(period);
-			Add(cat);
+			Insert(index, cat);
 		}
 
 		public static Categories Load(string filePath) {
diff --git a/LongoMatch/Store/Templates/TeamTemplate.cs b/LongoMatch/Store/Templates/TeamTemplate.cs
index 242d583..49f5ae2 100644
--- a/LongoMatch/Store/Templates/TeamTemplate.cs
+++ b/LongoMatch/Store/Templates/TeamTemplate.cs
@@ -55,7 +55,7 @@ namespace LongoMatch.Store.Templates
 		}
 		
 		public void AddDefaultItem (int i) {
-			Add(new Player {
+			Insert(i, new Player {
 					Name = "Player " + i,
 					Birthday = new DateTime(),
 					Height = 1.80f,



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