[longomatch/statebar: 3/13] Fix creation of default templates
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch/statebar: 3/13] Fix creation of default templates
- Date: Sun, 18 Sep 2011 23:36:27 +0000 (UTC)
commit 981337078700c89ff0a0e6ff89bae57cde6916e8
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Fri Sep 16 15:51:15 2011 +0200
Fix creation of default templates
LongoMatch/Store/Templates/CategoriesTemplate.cs | 2 +-
LongoMatch/Store/Templates/TeamTemplate.cs | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/LongoMatch/Store/Templates/CategoriesTemplate.cs b/LongoMatch/Store/Templates/CategoriesTemplate.cs
index 7a28538..7363683 100644
--- a/LongoMatch/Store/Templates/CategoriesTemplate.cs
+++ b/LongoMatch/Store/Templates/CategoriesTemplate.cs
@@ -115,7 +115,7 @@ namespace LongoMatch.Store.Templates
private void FillDefaultTemplate(int count) {
for(int i=1; i<=count; i++)
- AddDefaultItem(i);
+ AddDefaultItem(i-1);
}
}
}
diff --git a/LongoMatch/Store/Templates/TeamTemplate.cs b/LongoMatch/Store/Templates/TeamTemplate.cs
index 49f5ae2..16b944f 100644
--- a/LongoMatch/Store/Templates/TeamTemplate.cs
+++ b/LongoMatch/Store/Templates/TeamTemplate.cs
@@ -56,11 +56,11 @@ namespace LongoMatch.Store.Templates
public void AddDefaultItem (int i) {
Insert(i, new Player {
- Name = "Player " + i,
+ Name = "Player " + i+1,
Birthday = new DateTime(),
Height = 1.80f,
Weight = 80,
- Number = i,
+ Number = i+1,
Position = "",
Photo = null,
Playing = true,});
@@ -79,7 +79,7 @@ namespace LongoMatch.Store.Templates
private void FillDefaultTemplate(int playersCount) {
Clear();
for(int i=1; i<=playersCount; i++)
- AddDefaultItem(i);
+ AddDefaultItem(i-1);
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]