diff --git a/Source/Core/Controls/ImageBrowserControl.cs b/Source/Core/Controls/ImageBrowserControl.cs index ebdff7c3..bf6c604e 100755 --- a/Source/Core/Controls/ImageBrowserControl.cs +++ b/Source/Core/Controls/ImageBrowserControl.cs @@ -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