diff --git a/common/drawpanel.cpp b/common/drawpanel.cpp index 8f61bbca7f..a681f7dfa0 100644 --- a/common/drawpanel.cpp +++ b/common/drawpanel.cpp @@ -117,6 +117,11 @@ void WinEDA_DrawPanel::DrawCursor( wxDC* aDC, int aColor ) if( m_CursorLevel != 0 || aDC == NULL ) return; +#ifdef __WXMAC__ + SetCursor(*wxCROSS_CURSOR); + return; +#endif + wxPoint Cursor = GetScreen()->m_Curseur; GRSetDrawMode( aDC, GR_XOR ); @@ -812,16 +817,32 @@ void WinEDA_DrawPanel::DrawGrid( wxDC* DC ) // Under linux, to be tested (could be depend on linux versions // so perhaps could be necessary to set this option at run time. -#if defined( __WXMAC__ ) - wxWindowUpdateLocker( this ); // under macOSX: drawings are faster with this -#endif - - /* The bitmap grid drawing code below cannot be used when wxDC scaling is used * as it does not scale the grid bitmap properly. This needs to be fixed. */ -#if defined( __WXMAC__ ) || defined( USE_WX_ZOOM ) +#if defined( __WXMAC__ ) && !defined( USE_WX_ZOOM ) + // Use a pixel based draw to display grid + // When is not used USE_WX_ZOOM + for( ii = 0; ; ii++ ) + { + xg = wxRound( ii * screen_grid_size.x ); + if( xg > size.x ) + break; + xpos = org.x + xg; + xpos = GRMapX( xpos ); + for( jj = 0; ; jj++ ) + { + yg = wxRound( jj * screen_grid_size.y ); + if( yg > size.y ) + break; + ypos = org.y + yg; + DC->DrawPoint( xpos, GRMapY( ypos ) ); + } + } +#endif + +#if defined( USE_WX_ZOOM ) // Use a pixel based draw to display grid // There is a lot of calls, so the cost is hight // and grid is slowly drawn on some platforms diff --git a/pcbnew/class_pad_draw_functions.cpp b/pcbnew/class_pad_draw_functions.cpp index 94be016ecb..2986bc8d56 100644 --- a/pcbnew/class_pad_draw_functions.cpp +++ b/pcbnew/class_pad_draw_functions.cpp @@ -113,11 +113,6 @@ void D_PAD::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, int aDraw_mode, else drawInfo.m_ShowPadFilled = false; -#if defined(PCBNEW) || defined(__WXMAC__) - if( m_Flags & IS_MOVED || !DisplayOpt.DisplayPadFill ) - drawInfo.m_ShowPadFilled = false; -#endif - if( m_Masque_Layer & LAYER_FRONT ) { color = brd->GetVisibleElementColor( PAD_FR_VISIBLE ); diff --git a/pcbnew/controle.cpp b/pcbnew/controle.cpp index f375134b68..48cd92d76b 100644 --- a/pcbnew/controle.cpp +++ b/pcbnew/controle.cpp @@ -361,6 +361,10 @@ void WinEDA_PcbFrame::GeneralControle( wxDC* DC, wxPoint Mouse ) if( DrawPanel->ManageCurseur ) { +#ifdef __WXMAC__ + DrawPanel->Refresh(); + DrawPanel->Update(); +#endif DrawPanel->ManageCurseur( DrawPanel, DC, TRUE ); } } diff --git a/pcbnew/toolbars_update_user_interface.cpp b/pcbnew/toolbars_update_user_interface.cpp index ee8094125a..6f1bdfed36 100644 --- a/pcbnew/toolbars_update_user_interface.cpp +++ b/pcbnew/toolbars_update_user_interface.cpp @@ -281,9 +281,4 @@ void WinEDA_PcbFrame::SetToolbars() PrepareLayerIndicator(); DisplayUnitsMsg(); - -#ifdef __WXMAC__ - // Needed to avoid cursor tail - this->Refresh(); -#endif }