editors, OSX and menu[hack]: try to avoid crashes by postponing the creation of dialogs in the main loop.

This commit is contained in:
Laurent Alonso(fr)
2020-05-12 10:36:16 +02:00
committed by Celtic Minstrel
parent 3d7d465c7e
commit 6c904f3483
4 changed files with 29 additions and 3 deletions

View File

@@ -12,6 +12,8 @@
#include "winutil.hpp"
#include "undo.hpp"
extern short menuChoiceId;
using MenuHandle = NSMenu*;
MenuHandle menu_bar_handle;
MenuHandle file_menu, edit_menu, app_menu, scen_menu, town_menu, out_menu, help_menu;
@@ -166,6 +168,7 @@ void update_edit_menu() {
@implementation MenuHandler
-(void) menuChoice:(id) sender {
handle_menu_choice(eMenu([[sender representedObject] intValue]));
menuChoiceId=short([[sender representedObject] intValue]);
//handle_menu_choice(eMenu([[sender representedObject] intValue]));
}
@end