Fixed a bug where the wrong texture/flat with the same name would be displayed in the texture browser when they were loaded from a PK3 or directory

This commit is contained in:
biwa 2019-11-30 17:49:21 +01:00
parent cbaa0c030c
commit 8824a2bb94

View file

@ -481,9 +481,11 @@ namespace CodeImp.DoomBuilder.Controls
// biwa. Removes all duplicates. That was done each time in AddItem before. Much faster
// to do it in one go. Not sure when there are actually duplicates
// Depending on whether a floor or a wall is selected the corrosponding images come first
// in the list, so alawys keep the first occurence
public void MakeTexturesUnique()
{
items = items.GroupBy(item => item.TextureName).Select(item => item.Last()).ToList();
items = items.GroupBy(item => item.TextureName).Select(item => item.First()).ToList();
}
// This fills the list based on the objectname filter