From be3ccb52f406fde398776a98ae0873f03b66ee3c Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Sun, 11 Sep 2022 23:04:13 +0800 Subject: [PATCH] ClientMgr // Apply already-entered identifiers when calling COMDLG32. --- Source/WindowControllers/ctlClientListMgr.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/WindowControllers/ctlClientListMgr.swift b/Source/WindowControllers/ctlClientListMgr.swift index 8dc51cbc..d49ddbf1 100644 --- a/Source/WindowControllers/ctlClientListMgr.swift +++ b/Source/WindowControllers/ctlClientListMgr.swift @@ -79,11 +79,11 @@ extension ctlClientListMgr { alert.accessoryView = scrollview alert.beginSheetModal(for: window) { result in switch result { - case .alertFirstButtonReturn: + case .alertFirstButtonReturn, .alertSecondButtonReturn: theTextView.textContainer?.textView?.string.components(separatedBy: "\n").filter { !$0.isEmpty }.forEach { self.applyNewValue($0) } - case .alertSecondButtonReturn: + if result == .alertFirstButtonReturn { break } IME.dlgOpenPath.title = NSLocalizedString( "Choose the target application bundle.", comment: "" )