🍎 Fix incorrect extension when filters is used
This commit is contained in:
parent
5e149c827e
commit
217ddd629d
1 changed files with 6 additions and 4 deletions
|
@ -40,6 +40,7 @@ void SetAllowedFileTypes(NSSavePanel* dialog, const Filters& filters) {
|
||||||
if ([file_type_set count])
|
if ([file_type_set count])
|
||||||
file_types = [file_type_set allObjects];
|
file_types = [file_type_set allObjects];
|
||||||
|
|
||||||
|
[dialog setExtensionHidden:NO];
|
||||||
[dialog setAllowedFileTypes:file_types];
|
[dialog setAllowedFileTypes:file_types];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,15 +73,16 @@ void SetupDialog(NSSavePanel* dialog,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (settings.filters.empty())
|
||||||
|
[dialog setAllowsOtherFileTypes:YES];
|
||||||
|
else
|
||||||
|
SetAllowedFileTypes(dialog, settings.filters);
|
||||||
|
|
||||||
if (default_dir)
|
if (default_dir)
|
||||||
[dialog setDirectoryURL:[NSURL fileURLWithPath:default_dir]];
|
[dialog setDirectoryURL:[NSURL fileURLWithPath:default_dir]];
|
||||||
if (default_filename)
|
if (default_filename)
|
||||||
[dialog setNameFieldStringValue:default_filename];
|
[dialog setNameFieldStringValue:default_filename];
|
||||||
|
|
||||||
if (settings.filters.empty())
|
|
||||||
[dialog setAllowsOtherFileTypes:YES];
|
|
||||||
else
|
|
||||||
SetAllowedFileTypes(dialog, settings.filters);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetupDialogForProperties(NSOpenPanel* dialog, int properties) {
|
void SetupDialogForProperties(NSOpenPanel* dialog, int properties) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue