Skip to content

Commit

Permalink
Add missing SuspendPaint in SelectWhere, UnselectWhere
Browse files Browse the repository at this point in the history
SuspendPaint was missing to match the ResumePaint call in these two functions, thus throwing off the counter, and causing all kinds of visual issues when attempting to use these functions.
  • Loading branch information
trigger-segfault authored and peymanr34 committed Dec 13, 2023
1 parent c936bc0 commit 4e80a87
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ImageListView/ImageListView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1107,6 +1107,8 @@ public void InvertSelection()
/// </summary>
public void SelectWhere(Func<ImageListViewItem, bool> predicate)
{
SuspendPaint();

foreach (ImageListViewItem item in Items.Where(predicate))
item.mSelected = true;

Expand All @@ -1120,6 +1122,8 @@ public void SelectWhere(Func<ImageListViewItem, bool> predicate)
/// </summary>
public void UnselectWhere(Func<ImageListViewItem, bool> predicate)
{
SuspendPaint();

foreach (ImageListViewItem item in Items.Where(predicate))
item.mSelected = false;

Expand Down

0 comments on commit 4e80a87

Please sign in to comment.