Closed dbartolini closed 1 year ago
Please in which file should I notice duplicated "*.png"? Could you guide me on how to get to the file? I can't find any file named "Import"
NB: This is my first time I'm contributing to an open source project so if you could guide me to help you I'll appreciate. Thanks.
This is the line which populates the Gtk.FileFilter with duplicated entries: https://github.com/crownengine/crown/blob/0c543bbdf584ed7bf9aa8c7044f3b0a989e1201f/tools/level_editor/project.vala#L555
The filter is then used in the Import dialog File > Import
, there you can notice the duplicated "*.png" entries:
Hello, I'm looking to solve this issue. I'm not sure where the duplicate is coming from and my solution would be to search for and remove the duplicate from the list before it's added to the view. Would this solution be ok or were you looking to try and remove the duplicate .png at it's source?
Distinct ImporterData
instances may support common extensions. Think SpriteImporter and TextureImporter, they both support png
files and have that string in the extensions
field of their ImporterData
instance.
No check for duplicated extensions is being made when we aggregate extensions
from all registered ImporterData
structs:
https://github.com/crownengine/crown/blob/0c543bbdf584ed7bf9aa8c7044f3b0a989e1201f/tools/level_editor/project.vala#L554
You can either skip adding duplicated extensions (by specializing add_all()
for example) or remove duplicates in some way after they have been added.
In File > Import, notice duplicated "*.png".