Please change in
TLMDCustomFileDialog.Execute
Block:
if FFileTypes.Count > 0 then
begin
FDialog.SetFileTypeIndex(FFileTypeIndex);
FFileTypes.AllocNativeBuffer;
try
FDialog.SetFileTypes(FFileTypes.Count, FFileTypes.FillNativeBuffer);
finally
FFileTypes.FreeNativeBuffer;
end;
end;
Move Line to FDialog.SetFileTypeIndex to last of block.
It isn't possible to set FileTypeIndex if the file types are not set.
Comments
Try to use TLMDFileSaveDialog with setting of FileTypeIndex <> 0 before opening.
Then you will get in some circumstances duplicated extesions.
e.g MyFile.jpeg.png instead of MyFile.png.