diff --git a/include/class_drawpanel.h b/include/class_drawpanel.h index 0b0c8ff149..a90fd2fbea 100644 --- a/include/class_drawpanel.h +++ b/include/class_drawpanel.h @@ -8,6 +8,7 @@ #include "colors.h" #include "base_struct.h" +#include class WinEDA_DrawFrame; class BASE_SCREEN; @@ -60,6 +61,10 @@ public: int m_CursorLevel; // Index for cursor redraw in XOR // mode +#ifdef __WXMAC__ + // MAC Uses overlay to workaround the wxINVERT and wxXOR miss + wxOverlay m_overlay; +#endif /* Cursor management (used in editing functions) */ /* Mouse capture move callback function prototype. */ diff --git a/pcbnew/controle.cpp b/pcbnew/controle.cpp index 48cd92d76b..ea91c15625 100644 --- a/pcbnew/controle.cpp +++ b/pcbnew/controle.cpp @@ -362,11 +362,17 @@ void WinEDA_PcbFrame::GeneralControle( wxDC* DC, wxPoint Mouse ) if( DrawPanel->ManageCurseur ) { #ifdef __WXMAC__ - DrawPanel->Refresh(); - DrawPanel->Update(); -#endif + wxDCOverlay oDC( DrawPanel->m_overlay, DC ); + oDC.Clear(); + DrawPanel->ManageCurseur( DrawPanel, DC, FALSE ); +#else DrawPanel->ManageCurseur( DrawPanel, DC, TRUE ); +#endif } +#ifdef __WXMAC__ + else + DrawPanel->m_overlay.Reset(); +#endif } if( hotkey ) diff --git a/pcbnew/modules.cpp b/pcbnew/modules.cpp index 2257edb41b..28276f2f3d 100644 --- a/pcbnew/modules.cpp +++ b/pcbnew/modules.cpp @@ -571,11 +571,8 @@ void DrawModuleOutlines( WinEDA_DrawPanel* panel, wxDC* DC, MODULE* module ) if( g_Show_Pads_Module_in_Move ) { pad_fill_tmp = DisplayOpt.DisplayPadFill; -#ifndef __WXMAC__ DisplayOpt.DisplayPadFill = true; -#else - DisplayOpt.DisplayPadFill = false; -#endif + pt_pad = module->m_Pads; for( ; pt_pad != NULL; pt_pad = pt_pad->Next() ) { diff --git a/pcbnew/tracepcb.cpp b/pcbnew/tracepcb.cpp index 8b32bb647f..c8e4002896 100644 --- a/pcbnew/tracepcb.cpp +++ b/pcbnew/tracepcb.cpp @@ -18,6 +18,7 @@ #include "module_editor_frame.h" #include "pcbplot.h" #include "protos.h" +#include extern int g_DrawDefaultLineThickness; // Default line thickness, used to draw Frame references @@ -53,6 +54,12 @@ void WinEDA_ModuleEditFrame::RedrawActiveWindow( wxDC* DC, bool EraseBg ) module->Draw( DrawPanel, DC, GR_OR ); } +#ifdef __WXMAC__ + DrawPanel->m_overlay.Reset(); + wxDCOverlay overlaydc( DrawPanel->m_overlay, DC ); + overlaydc.Clear(); +#endif + screen->ClrRefreshReq(); if( DrawPanel->ManageCurseur ) @@ -83,6 +90,12 @@ void WinEDA_PcbFrame::RedrawActiveWindow( wxDC* DC, bool EraseBg ) DrawGeneralRatsnest( DC ); +#ifdef __WXMAC__ + DrawPanel->m_overlay.Reset(); + wxDCOverlay overlaydc( DrawPanel->m_overlay, DC ); + overlaydc.Clear(); +#endif + GetScreen()->ClrRefreshReq(); if( DrawPanel->ManageCurseur )