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