Fix puzzle selection issue

This commit is contained in:
Tim Young 2018-09-28 13:50:33 -05:00
parent 49b2f63698
commit 65f14420f7

View File

@ -378,11 +378,8 @@ namespace EduNetworkBuilder
} }
if(selected != null && selected != "") if(selected != null && selected != "")
{ {
foreach (object one in lbWindowData.Items) if (selectedIndex >= 0 && selectedIndex < lbWindowData.Items.Count)
{ lbWindowData.SelectedIndex = selectedIndex;
if(one.ToString() == selected)
lbWindowData.SelectedItem = selected;
}
} }
if(lbWindowData.SelectedIndex != -1) if(lbWindowData.SelectedIndex != -1)
{ {
@ -788,8 +785,8 @@ namespace EduNetworkBuilder
oursettings.ScoreList.Add(TheName); oursettings.ScoreList.Add(TheName);
} }
} }
UpdateForm();
} }
UpdateForm();
} }
if (MyMode == LBContents.regressiontest) if (MyMode == LBContents.regressiontest)
UpdateForm(); UpdateForm();