Clear before adding items on reload

This commit is contained in:
Jelle
2022-10-16 16:53:09 +02:00
parent c9bf194997
commit 4963d8ca6c

View File

@@ -54,6 +54,7 @@ public GenericEditor(Func<GenericEditor<T>, DataCache<T>> loadCache, Func<T, int
// Reload editor
Cache = loadCache(this);
Names = Cache.LoadAll().Select(nameSelector).ToArray();
CB_EntryName.Items.Clear();
CB_EntryName.Items.AddRange(Names);
System.Media.SystemSounds.Asterisk.Play();