fixed ColumnSettings.LoadSettings when the number of columns has been decreased

git-svn-id: svn://svn.code.sf.net/p/processhacker/code@2039 21ef857c-d57f-4fe0-8362-d861dc6d29cd
This commit is contained in:
wj32
2009-10-03 07:15:57 +00:00
parent 4ea71eaced
commit 516bfda673
+5 -1
View File
@@ -92,11 +92,15 @@ namespace ProcessHacker.UI
if (settings == "")
return;
// Has the number of columns changed? If so, don't do anything.
if (list.Length != lv.Columns.Count)
return;
for (int i = 0; i < list.Length; i++)
{
string[] s = list[i].Split(',');
if (s.Length == 1)
if (s.Length != 2)
break;
lv.Columns[i].DisplayIndex = Int32.Parse(s[0]);