mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-25 07:55:52 +00:00
fix: CPAlert fails to runModal if ran sheetModal before
This commit is contained in:
1 parent
38033d9dcb
commit
6b42ef3cb1
1 file changed
+9
@@ -495,6 +495,12 @@ CPCriticalAlertStyle = 2;
|
||||
*/
|
||||
- (void)runModal
|
||||
{
|
||||
if (!([_window styleMask] & CPTitledWindowMask))
|
||||
{
|
||||
_needsLayout = YES;
|
||||
[self _createWindowWithStyle:CPTitledWindowMask];
|
||||
}
|
||||
|
||||
[self layout];
|
||||
[CPApp runModalForWindow:_window];
|
||||
}
|
||||
@@ -510,7 +516,10 @@ CPCriticalAlertStyle = 2;
|
||||
- (void)beginSheetModalForWindow:(CPWindow)aWindow modalDelegate:(id)modalDelegate didEndSelector:(SEL)alertDidEndSelector contextInfo:(id)contextInfo
|
||||
{
|
||||
if (!([_window styleMask] & CPDocModalWindowMask))
|
||||
{
|
||||
_needsLayout = YES;
|
||||
[self _createWindowWithStyle:CPDocModalWindowMask];
|
||||
}
|
||||
|
||||
[self layout];
|
||||
|
||||
|
||||
Reference in new issue
Block a user