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.
This commit is contained in:
Deniz Türkoglu
2019-04-05 17:23:32 +11:00
committed by Michael Starke
parent 1c0a76dc74
commit ae4656c79a

View File

@@ -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 {