Update FormMain.cs

This commit is contained in:
Asayu233 2022-07-08 10:29:06 +08:00 committed by GitHub
parent b0a1c5d7a3
commit 8c03726cb0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -781,10 +781,10 @@ namespace GrasscutterTools.Forms
RbEntityNPC;
if (rb.Checked)
{
ListGameItems.BeginUpdate();
ListEntity.BeginUpdate();
ListEntity.Items.Clear();
ListEntity.Items.AddRange(rb.Tag as string[]);
ListGameItems.EndUpdate();
ListEntity.EndUpdate();
}
}
@ -795,10 +795,10 @@ namespace GrasscutterTools.Forms
RbEntityMonster.Checked ? RbEntityMonster :
RbEntityNPC;
var data = rb.Tag as string[];
ListGameItems.BeginUpdate();
ListEntity.BeginUpdate();
ListEntity.Items.Clear();
ListEntity.Items.AddRange(data.Where(n => n.Contains(filter)).ToArray());
ListGameItems.EndUpdate();
ListEntity.EndUpdate();
}
private bool GenSpawnEntityCommand()