Center modal window

This commit is contained in:
Gregory John Casamento 2020-07-04 15:14:48 -04:00
parent 41460c80c5
commit 1e565994cd

View file

@ -112,7 +112,6 @@
}
else if ([_kind isEqualToString: @"modal"])
{
NSInteger code = NSRunContinuesResponse;
NSWindow *w = nil;
if ([_destinationController isKindOfClass: [NSWindowController class]])
{
@ -123,11 +122,8 @@
w = [NSWindow windowWithContentViewController: _destinationController];
}
RETAIN(w);
code = [NSApp runModalForWindow: w];
if (code != NSRunContinuesResponse)
{
NSLog(@"Modal returned error response.");
}
[w center];
[NSApp runModalForWindow: w];
RELEASE(w);
}
else if ([_kind isEqualToString: @"show"])