mirror of
https://github.com/coteditor/CotEditor.git
synced 2024-09-11 19:27:30 +03:00
Fix fileDocument did not set
This commit is contained in:
parent
9e65605585
commit
f6dc7dc7b1
@ -78,6 +78,9 @@ final class DocumentWindowController: NSWindowController, NSWindowDelegate {
|
||||
|
||||
required init(document: Document? = nil, directoryDocument: DirectoryDocument? = nil) {
|
||||
|
||||
self.fileDocument = document
|
||||
self.directoryDocument = directoryDocument
|
||||
|
||||
let window = DocumentWindow(contentViewController: WindowContentViewController(document: document, directoryDocument: directoryDocument))
|
||||
window.styleMask.update(with: .fullSizeContentView)
|
||||
window.setFrameAutosaveName((directoryDocument == nil) ? "Document" : "DirectoryDocument")
|
||||
@ -95,8 +98,6 @@ final class DocumentWindowController: NSWindowController, NSWindowDelegate {
|
||||
window.setFrame(.init(origin: window.frame.origin, size: frameSize), display: false)
|
||||
}
|
||||
|
||||
self.directoryDocument = directoryDocument
|
||||
|
||||
super.init(window: window)
|
||||
|
||||
self.updateDocument(document)
|
||||
|
Loading…
Reference in New Issue
Block a user