From ae4656c79a5a7b185880a1abc3427a398a86d11e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deniz=20T=C3=BCrkoglu?= Date: Fri, 5 Apr 2019 17:23:32 +1100 Subject: [PATCH] Keyfile selection window must be modal (#898) If we don't use the modal view, the user can put the file selection window to background, click 'Choose...' and open additional windows. --- MacPass/MPPathControl.m | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/MacPass/MPPathControl.m b/MacPass/MPPathControl.m index c0f8083a..ff5fbdae 100644 --- a/MacPass/MPPathControl.m +++ b/MacPass/MPPathControl.m @@ -44,11 +44,10 @@ if([self.delegate respondsToSelector:@selector(pathControl:willDisplayOpenPanel:)]) { [self.delegate pathControl:self willDisplayOpenPanel:panel]; } - [panel beginWithCompletionHandler:^(NSModalResponse result) { - if(result == NSModalResponseOK) { - self.URL = panel.URLs.firstObject; - } - }]; + NSModalResponse result = [panel runModal]; + if(result == NSModalResponseOK) { + self.URL = panel.URLs.firstObject; + } } - (void)pathControl:(NSPathControl *)pathControl willPopUpMenu:(NSMenu *)menu {