project_files/HedgewarsMobile/Classes/SchemeWeaponConfigViewController.m
changeset 3952 d6412423da45
parent 3917 4c243b1eac97
child 3971 5c82ee165ed5
--- a/project_files/HedgewarsMobile/Classes/SchemeWeaponConfigViewController.m	Mon Oct 11 00:08:48 2010 +0200
+++ b/project_files/HedgewarsMobile/Classes/SchemeWeaponConfigViewController.m	Mon Oct 11 03:28:15 2010 +0200
@@ -53,15 +53,15 @@
     NSArray *contentsOfDir = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:SCHEMES_DIRECTORY() error:NULL];
     self.listOfSchemes = contentsOfDir;
 
-    if ([listOfSchemes containsObject:@"Default.plist"])
-         self.selectedScheme = @"Default.plist";
-
+    if ([self.selectedScheme isEqualToString:@""] && [listOfSchemes containsObject:@"Default.plist"])
+        self.selectedScheme = @"Default.plist";
+    
     contentsOfDir = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:WEAPONS_DIRECTORY() error:NULL];
     self.listOfWeapons = contentsOfDir;
-
-    if ([listOfWeapons containsObject:@"Default.plist"])
-         self.selectedWeapon = @"Default.plist";
-
+    
+    if ([self.selectedWeapon isEqualToString:@""] && [listOfWeapons containsObject:@"Default.plist"])
+        self.selectedWeapon = @"Default.plist";
+    
     [self.tableView reloadData];
 }