1
0
mirror of https://github.com/TomHarte/CLK.git synced 2025-08-08 14:25:05 +00:00

Corrects improper NSWindowController sheet stack manipulation.

As a result, 'Insert...' now seems to work properly.
This commit is contained in:
Thomas Harte
2018-08-05 22:47:51 -04:00
parent 832939f5b7
commit 31df8c7e91

View File

@@ -56,7 +56,6 @@ class MachineDocument:
super.windowControllerDidLoadNib(aController) super.windowControllerDidLoadNib(aController)
aController.window?.contentAspectRatio = self.aspectRatio() aController.window?.contentAspectRatio = self.aspectRatio()
setupMachineOutput() setupMachineOutput()
} }
// Attempting to show a sheet before the window is visible (such as when the NIB is loaded) results in // Attempting to show a sheet before the window is visible (such as when the NIB is loaded) results in
@@ -281,7 +280,7 @@ class MachineDocument:
@IBAction func createMachine(_ sender: NSButton?) { @IBAction func createMachine(_ sender: NSButton?) {
self.configureAs(machinePicker!.selectedMachine()) self.configureAs(machinePicker!.selectedMachine())
machinePicker = nil machinePicker = nil
sender?.window?.close() self.windowControllers[0].window?.endSheet(self.machinePickerPanel!)
} }
@IBAction func cancelCreateMachine(_ sender: NSButton?) { @IBAction func cancelCreateMachine(_ sender: NSButton?) {