Page MenuHomePhabricator

File endings in file dialogs are not correct
Closed, ResolvedPublic

Description

Some entries are duplicated, some are not valid or strangely formatted. Esprecially in internal applications as the SandboxApp.

This appeared after fixing T2807.

Event Timeline

We walked through the code. In mitkCoreObjectFactory is a variable "m_FileExtensions" initialized with EXTERNAL_FILE_EXTENSIONS which contains a list of file extensions. Step by step other file extensions are appended from other classes in the following order:

-> CoreObjectFactory -> External

-> QMCoreObjectFactory -> Internal
-> SBCoreObjectFactory -> Internal
-> PlanarFigureObjectFactory -> "" 
-> CoreExtObjectFactory -> ""

Each list has different entries but some are duplicated. Therefore the displayed list shows also duplicated extensions.

What is the intension behind appending the lists? And is it necessary to have generell entries in every list?

How should a good solution look like?

[SVN revision 24577]
FIX (#3848): fixed problem with duplicated file extension entries

[SVN revision 24726]
FIX (#3848): added additional file endings: tif and jpeg.

[SVN revision 25647]
FIX (#3848): solved the problem that not all file endings are proposed in the drop down menu when saving a file.

[SVN revision 25669]
FIX (#3848): added jpeg, bmp, png, tif and tiff to file extension map for opening images. For saving images these formats already existed in file extension map.