/[RomCheater]/trunk/RomCheater/Docking/PIDSelector.cs
ViewVC logotype

Diff of /trunk/RomCheater/Docking/PIDSelector.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/RomCheater/Docking/PIDSelector.cs	2012/06/07 18:29:28	327
+++ trunk/RomCheater/Docking/PIDSelector.cs	2012/06/07 18:32:25	328
@@ -252,13 +252,15 @@
                 //if (!items.Contains(item)) items.Add(item);
             }
             this.lstProcessList.Items.Add(item);
-            if (lstProcessList.Items.Count == 1)
+            if (lstProcessList.Items.Count == 2)
             {
-                lstProcessList.Items[0].Selected = true;
+                lstProcessList.Items[0].Selected = false;
+                lstProcessList.Items[1].Selected = true;
             }
             else
             {
-                lstProcessList.Items[lstProcessList.SelectedItems[0].Index].Selected = false;
+                if (lstProcessList.SelectedItems.Count > 0)
+                    lstProcessList.Items[lstProcessList.SelectedItems[0].Index].Selected = false;
                 lstProcessList.Items[lstProcessList.Items.IndexOf(item)].Selected = true;
             }
         }

 

  ViewVC Help
Powered by ViewVC 1.1.22