LCL: use consistent coding/indentation style in TOpenDialog.DoExecute.

This commit is contained in:
Bart 2023-08-31 22:23:51 +02:00
parent fc8abb150c
commit c818418cfa

View File

@ -446,12 +446,10 @@ begin
//This behaviour is completely irratic when multiple files are selected, it can be on or off given the same input //This behaviour is completely irratic when multiple files are selected, it can be on or off given the same input
//Delphi 7 seems to not include the ofExtensionDifferent flag if multiple files are selected, regardless of their extensions //Delphi 7 seems to not include the ofExtensionDifferent flag if multiple files are selected, regardless of their extensions
//So, we unset the ofExtensionDifferent if multiple files are selected //So, we unset the ofExtensionDifferent if multiple files are selected
if Result then if Result then begin
begin
if (Files.Count > 1) then if (Files.Count > 1) then
Exclude(FOptions, ofExtensionDifferent) Exclude(FOptions, ofExtensionDifferent)
else else begin
begin
if (DefaultExt <> '') and (CompareFileNames(DefaultExt,ExtractFileExt(Filename)) <> 0) then if (DefaultExt <> '') and (CompareFileNames(DefaultExt,ExtractFileExt(Filename)) <> 0) then
Include(FOptions, ofExtensionDifferent); Include(FOptions, ofExtensionDifferent);
end; end;