Fix crappy bug that happens with NSOpenPanel and Cocoa GL - current
context gets lost
This commit is contained in:
parent
a2580d3ec2
commit
4461ff8442
|
@ -334,6 +334,7 @@ extern void action_ok_push_quick_menu(void);
|
||||||
[panel beginSheetForDirectory:nil file:nil modalForWindopw:[self window] modalDelegate:self didEndSelector:@selector(didEndSaveSheet:returnCode:contextInfo:) contextInfo:NULL];
|
[panel beginSheetForDirectory:nil file:nil modalForWindopw:[self window] modalDelegate:self didEndSelector:@selector(didEndSaveSheet:returnCode:contextInfo:) contextInfo:NULL];
|
||||||
#endif
|
#endif
|
||||||
[[NSApplication sharedApplication] runModalForWindow:panel];
|
[[NSApplication sharedApplication] runModalForWindow:panel];
|
||||||
|
[g_context makeCurrentContext];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)openDocument:(id)sender
|
- (void)openDocument:(id)sender
|
||||||
|
@ -379,6 +380,7 @@ extern void action_ok_push_quick_menu(void);
|
||||||
[panel beginSheetForDirectory:nil file:nil modalForWindopw:[self window] modalDelegate:self didEndSelector:@selector(didEndSaveSheet:returnCode:contextInfo:) contextInfo:NULL];
|
[panel beginSheetForDirectory:nil file:nil modalForWindopw:[self window] modalDelegate:self didEndSelector:@selector(didEndSaveSheet:returnCode:contextInfo:) contextInfo:NULL];
|
||||||
#endif
|
#endif
|
||||||
[[NSApplication sharedApplication] runModalForWindow:panel];
|
[[NSApplication sharedApplication] runModalForWindow:panel];
|
||||||
|
[g_context makeCurrentContext];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)unloadingCore
|
- (void)unloadingCore
|
||||||
|
|
Loading…
Reference in New Issue