From 167e4f0bf267214d0b33e3329d813e41044a3379 Mon Sep 17 00:00:00 2001 From: Roopesh Chander Date: Sun, 12 May 2019 13:23:52 +0530 Subject: [PATCH] macOS: Edit view: Dismiss on Esc Signed-off-by: Roopesh Chander --- .../UI/macOS/ViewController/TunnelEditViewController.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/WireGuard/WireGuard/UI/macOS/ViewController/TunnelEditViewController.swift b/WireGuard/WireGuard/UI/macOS/ViewController/TunnelEditViewController.swift index 471c4fe..2773291 100644 --- a/WireGuard/WireGuard/UI/macOS/ViewController/TunnelEditViewController.swift +++ b/WireGuard/WireGuard/UI/macOS/ViewController/TunnelEditViewController.swift @@ -287,3 +287,9 @@ class TunnelEditViewController: NSViewController { } } } + +extension TunnelEditViewController { + override func cancelOperation(_ sender: Any?) { + handleDiscardAction() + } +}