Skip to content

Commit

Permalink
fix bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
alanthinker committed Jul 21, 2019
1 parent 6a8fa8d commit ba67857
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Log2Window/Log/LoggerItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -421,9 +421,11 @@ public static void TryEnsureVisibleForSuitableItems(ListView logListView)
else
{
logListView.SelectedIndices.Clear();
logListView.SelectedIndices.Add(index);
if (LogManager.Instance._dataSource[index].Message.ArrivedId == LogManager.Instance.manulSelectedArrivedId)
{
logListView.SelectedIndices.Add(index);
}
}

}
finally
{
Expand Down
4 changes: 4 additions & 0 deletions src/Log2Window/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1307,6 +1307,10 @@ public void ReBindListViewFromAllLogMessageItems(bool needDeleteMessages = false
{
LogManager.Instance.inSetSelectedIndicesByCode = true;
logListView.SelectedIndices.Clear();
if (LogManager.Instance._dataSource[lastIndex].Message.ArrivedId == LogManager.Instance.manulSelectedArrivedId)
{
logListView.SelectedIndices.Add(lastIndex);
}
}
finally
{
Expand Down

0 comments on commit ba67857

Please sign in to comment.