From b07b2142939b88b3359ce80bd9a8d4c99c15d283 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 25 Nov 2012 09:08:25 +0100 Subject: [PATCH] MacOSX: Crash in pcbnew during edit footprint and changing layer from dialog (Fixes: #764678) --- pcbnew/editmod.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/pcbnew/editmod.cpp b/pcbnew/editmod.cpp index c6ad45a26c..50a5fb488f 100644 --- a/pcbnew/editmod.cpp +++ b/pcbnew/editmod.cpp @@ -27,8 +27,14 @@ void PCB_EDIT_FRAME::InstallModuleOptionsFrame( MODULE* Module, wxDC* DC ) if( Module == NULL ) return; +#ifndef __WXMAC__ DIALOG_MODULE_BOARD_EDITOR* dialog = new DIALOG_MODULE_BOARD_EDITOR( this, Module, DC ); - +#else + // avoid Avoid "writes" in the dialog, creates errors with WxOverlay and NSView & Modal + // Raising an Exception - Fixes #764678 + DIALOG_MODULE_BOARD_EDITOR* dialog = new DIALOG_MODULE_BOARD_EDITOR( this, Module, NULL ); +#endif + int retvalue = dialog->ShowModal(); /* retvalue = * -1 if abort, * 0 if exchange module, @@ -37,6 +43,12 @@ void PCB_EDIT_FRAME::InstallModuleOptionsFrame( MODULE* Module, wxDC* DC ) */ dialog->Destroy(); +#ifdef __WXMAC__ + // If something edited, push a refresh request + if (retvalue == 0 || retvalue == 1) + m_canvas->Refresh(); +#endif + if( retvalue == 2 ) { FOOTPRINT_EDIT_FRAME * editorFrame =