Fix NSAlert appearing without a button. New behavior sets 'OK' if none are set.

This commit is contained in:
Gregory John Casamento 2020-07-20 23:11:19 -04:00
parent 586d207066
commit b08a9576ff

View file

@ -2005,6 +2005,10 @@ void NSBeginInformationalAlertSheet(NSString *title,
icon: _icon
title: _message_text != nil ? _message_text : _(@"Alert")
message: _informative_text != nil ? _informative_text : _(@"No information")];
if ([_buttons count] == 0)
{
[self addButtonWithTitle: @"OK"];
}
[panel setButtons: _buttons];
}
}