fix: correct reversed logic in NativeWindowMac::SetEnabled (#15324)

This commit is contained in:
trop[bot] 2018-10-23 23:22:19 +11:00 committed by Samuel Attard
parent 203c47f038
commit c7501bd7ca

View file

@ -583,13 +583,13 @@ bool NativeWindowMac::IsEnabled() {
void NativeWindowMac::SetEnabled(bool enable) { void NativeWindowMac::SetEnabled(bool enable) {
if (enable) { if (enable) {
[window_ endSheet:[window_ attachedSheet]];
} else {
[window_ beginSheet:window_ [window_ beginSheet:window_
completionHandler:^(NSModalResponse returnCode) { completionHandler:^(NSModalResponse returnCode) {
NSLog(@"modal enabled"); NSLog(@"modal enabled");
return; return;
}]; }];
} else {
[window_ endSheet:[window_ attachedSheet]];
} }
} }