[longomatch/redesign3: 105/143] If dict initialisation



commit 74645d6850aee924ebae85096d029d1c75757196
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Sat Apr 2 18:00:06 2011 +0200

    If dict initialisation

 LongoMatch/Gui/Component/CategoryProperties.cs |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/LongoMatch/Gui/Component/CategoryProperties.cs b/LongoMatch/Gui/Component/CategoryProperties.cs
index 3255da1..56e4826 100644
--- a/LongoMatch/Gui/Component/CategoryProperties.cs
+++ b/LongoMatch/Gui/Component/CategoryProperties.cs
@@ -50,10 +50,12 @@ namespace LongoMatch.Gui.Component
 		{
 			this.Build();
 			subcategoriesTemplates = MainClass.ts.SubCategoriesTemplateProvider;
+			subCategories = new Dictionary<string, TagSubCategory>();
 			LoadSubcategories();
 		}
 
 		private void LoadSubcategories() {
+			subCategories.Clear();
 			foreach (TagSubCategory subcat in subcategoriesTemplates.Templates) {
 				subCategories.Add(subcat.Name, subcat);
 				subcatcombobox.AppendText(subcat.Name);



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