Fix crappy bug that happens with NSOpenPanel and Cocoa GL - current

context gets lost
This commit is contained in:
Twinaphex 2016-01-13 19:44:05 +01:00
parent a2580d3ec2
commit 4461ff8442

View File

@ -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];
#endif
[[NSApplication sharedApplication] runModalForWindow:panel];
[g_context makeCurrentContext];
}
- (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];
#endif
[[NSApplication sharedApplication] runModalForWindow:panel];
[g_context makeCurrentContext];
}
- (void)unloadingCore