carbon: fix file dialog selection based on FCompStyle instead of the class. #20298

git-svn-id: trunk@32639 -
This commit is contained in:
dmitry 2011-10-03 01:08:41 +00:00
parent 2c4a5c9520
commit 7e93fb1efe

View File

@ -296,7 +296,7 @@ begin
if supportPackages then
CreationOptions.optionFlags := CreationOptions.optionFlags or kNavSupportPackages;
try
if FileDialog is TSaveDialog then
if FileDialog.FCompStyle=csSaveFileDialog then
begin // Checking for TSaveDialog first since it's descendent of TOpenDialog
CreateCFString(ExtractFileName(FileDialog.FileName),
CreationOptions.saveFileName); // Note doesn't like path