fix the selection jumping bug
This commit is contained in:
parent
b7f7a6b9ae
commit
481ddc0121
@ -261,6 +261,8 @@ namespace EduNetworkBuilder
|
||||
{
|
||||
int selectedIndex = lbWindowData.SelectedIndex;
|
||||
string selected = "";
|
||||
int topmost = lbWindowData.TopIndex;
|
||||
int totalcount = lbWindowData.Items.Count;
|
||||
if (lbWindowData.SelectedIndex != -1)
|
||||
selected = lbWindowData.Items[lbWindowData.SelectedIndex].ToString();
|
||||
lbWindowData.Items.Clear();
|
||||
@ -382,7 +384,10 @@ namespace EduNetworkBuilder
|
||||
if(selected != null && selected != "")
|
||||
{
|
||||
if (selectedIndex >= 0 && selectedIndex < lbWindowData.Items.Count)
|
||||
{
|
||||
lbWindowData.SelectedIndex = selectedIndex;
|
||||
lbWindowData.TopIndex = topmost;
|
||||
}
|
||||
}
|
||||
if(lbWindowData.SelectedIndex != -1)
|
||||
{
|
||||
@ -455,7 +460,10 @@ namespace EduNetworkBuilder
|
||||
if (selected != null && selected != "")
|
||||
{
|
||||
if (selectedIndex >= 0 && selectedIndex < lbWindowData.Items.Count)
|
||||
{
|
||||
lbWindowData.SelectedIndex = selectedIndex;
|
||||
lbWindowData.TopIndex = topmost;
|
||||
}
|
||||
}
|
||||
if (lbWindowData.SelectedIndex != -1)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user