Revert save panel workaround

This commit is contained in:
1024jp 2023-09-04 12:59:51 +09:00
parent 19cebcdeea
commit 24c8c96e5b
2 changed files with 12 additions and 0 deletions

View File

@ -13,6 +13,11 @@ Change Log
- [beta] Adjust layout in the syntax editor.
### Fixes
- Fix an issue that documents could not be saved with an unknown file extension.
4.6.0-beta.2 (583)
--------------------------

View File

@ -543,6 +543,13 @@ final class Document: NSDocument, AdditionalDocumentPreparing, EncodingHolder {
accessoryView.sizingOptions = .intrinsicContentSize
savePanel.accessoryView = accessoryView
// let save panel accept any file extension
// -> Otherwise, the file extension for `.allowedContentTypes` is automatically added
// even when the user specifies another one (macOS 14, 2023-09).
DispatchQueue.main.async { [weak savePanel] in
savePanel?.allowedContentTypes = []
}
return true
}