# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1382720168 0 # Node ID 8637a32d33d954648bd3f585e712e94013696805 # Parent fafe1a68f0fd3a99449a2ecbbc0a6b35d64e7365 Logic error caused the alert style to get set after the alert was shown. diff -r fafe1a68f0fd -r 8637a32d33d9 mac/dw.m --- a/mac/dw.m Fri Oct 25 09:38:21 2013 +0000 +++ b/mac/dw.m Fri Oct 25 16:56:08 2013 +0000 @@ -3390,8 +3390,6 @@ alert = [NSAlert alertWithMessageText:[ NSString stringWithUTF8String:title ] defaultButton:button1 alternateButton:button2 otherButton:button3 informativeTextWithFormat:@"%@", [[[NSString alloc] initWithFormat:[NSString stringWithUTF8String:format] arguments:args] autorelease]]; va_end(args); - iResponse = [alert runModal]; - if(flags & DW_MB_ERROR) [alert setAlertStyle:NSCriticalAlertStyle]; else if(flags & DW_MB_INFORMATION) @@ -3399,6 +3397,8 @@ else [alert setAlertStyle:NSWarningAlertStyle]; + iResponse = [alert runModal]; + switch(iResponse) { case NSAlertDefaultReturn: /* user pressed OK */