Skip to content

Commit

Permalink
Merge pull request #3427 from Ginger-Automation/BugFix/POMSearchText3…
Browse files Browse the repository at this point in the history
…7171

Issue of POM text search in act 37171
  • Loading branch information
AmanPrasad43 authored Jan 8, 2024
2 parents 6b85c97 + 262fc4f commit 00456a6
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions Ginger/Ginger/UserControlsLib/UCListView/UcListView.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -298,12 +298,15 @@ private void SetListSelectedItemAsSourceCurrentItem()
{
this.Dispatcher.Invoke(() =>
{
if (mObjList.CurrentItem != xListView.SelectedItem)
if(mObjList.CurrentItem != null && xListView.Items.Count > 0)
{
xListView.SelectedItem = mObjList.CurrentItem;
int index = xListView.Items.IndexOf(mObjList.CurrentItem);
xListView.SelectedIndex = index;
ScrollToViewCurrentItem();
if (mObjList.CurrentItem != xListView.SelectedItem)
{
xListView.SelectedItem = mObjList.CurrentItem;
int index = xListView.Items.IndexOf(mObjList.CurrentItem);
xListView.SelectedIndex = index;
ScrollToViewCurrentItem();
}
}
});
}
Expand Down

0 comments on commit 00456a6

Please sign in to comment.