mirror of
https://github.com/xi-editor/xi-mac.git
synced 2024-10-06 03:58:19 +03:00
Merge pull request #274 from scholtzan/bugfix-document-crash
Bugfix: prevent crashing when opening second document
This commit is contained in:
commit
8ffb51aa8f
@ -77,10 +77,10 @@ class Document: NSDocument {
|
||||
windowController.window?.minSize = Document.minWinSize
|
||||
|
||||
self.editViewController = windowController.contentViewController as? EditViewController
|
||||
editViewController?.document = self
|
||||
if let config = (NSApplication.shared.delegate as? AppDelegate)?.configCache {
|
||||
editViewController?.configChanged(changes: config)
|
||||
}
|
||||
editViewController?.document = self
|
||||
windowController.window?.delegate = editViewController
|
||||
self.addWindowController(windowController)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user