OSX adjustments - grid fix - speedup of refresh
This commit is contained in:
parent
5b832a66ba
commit
bf67eed7eb
|
@ -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
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -281,9 +281,4 @@ void WinEDA_PcbFrame::SetToolbars()
|
|||
|
||||
PrepareLayerIndicator();
|
||||
DisplayUnitsMsg();
|
||||
|
||||
#ifdef __WXMAC__
|
||||
// Needed to avoid cursor tail
|
||||
this->Refresh();
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue