From 4461ff8442ac9013d84b8001df6b8c42305f4eb7 Mon Sep 17 00:00:00 2001 From: Twinaphex Date: Wed, 13 Jan 2016 19:44:05 +0100 Subject: [PATCH] Fix crappy bug that happens with NSOpenPanel and Cocoa GL - current context gets lost --- ui/drivers/ui_cocoa.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ui/drivers/ui_cocoa.m b/ui/drivers/ui_cocoa.m index 35e542783b..cb7a7adb3a 100644 --- a/ui/drivers/ui_cocoa.m +++ b/ui/drivers/ui_cocoa.m @@ -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