From 31df8c7e91ab7d0de1c7cbaeca674abec5275442 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sun, 5 Aug 2018 22:47:51 -0400 Subject: [PATCH] Corrects improper NSWindowController sheet stack manipulation. As a result, 'Insert...' now seems to work properly. --- OSBindings/Mac/Clock Signal/Documents/MachineDocument.swift | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/OSBindings/Mac/Clock Signal/Documents/MachineDocument.swift b/OSBindings/Mac/Clock Signal/Documents/MachineDocument.swift index 9b31a9cee..7c5165a3e 100644 --- a/OSBindings/Mac/Clock Signal/Documents/MachineDocument.swift +++ b/OSBindings/Mac/Clock Signal/Documents/MachineDocument.swift @@ -56,7 +56,6 @@ class MachineDocument: super.windowControllerDidLoadNib(aController) aController.window?.contentAspectRatio = self.aspectRatio() setupMachineOutput() - } // 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?) { self.configureAs(machinePicker!.selectedMachine()) machinePicker = nil - sender?.window?.close() + self.windowControllers[0].window?.endSheet(self.machinePickerPanel!) } @IBAction func cancelCreateMachine(_ sender: NSButton?) {