Commit 1b0da6c3 authored by jean-pierre charras's avatar jean-pierre charras

fixed compil errors with USE_WX_ZOOM on.

parent a13ddf38
......@@ -487,7 +487,7 @@ void D_PAD::DrawShape( EDA_Rect* aClipBox, wxDC* aDC, PAD_DRAWINFO& aDrawInfo )
case PAD_CIRCLE:
#ifdef USE_WX_ZOOM
if( DC->LogicalToDeviceXRel( hole ) > 1 )
if( aDC->LogicalToDeviceXRel( hole ) > 1 )
#else
if( aDrawInfo.m_Scale * hole > 1 ) /* draw hole if its size is enough */
#endif
......@@ -602,7 +602,7 @@ void D_PAD::DrawShape( EDA_Rect* aClipBox, wxDC* aDC, PAD_DRAWINFO& aDrawInfo )
#define CHAR_SIZE_MIN 5
#ifdef USE_WX_ZOOM
if( DC->LogicalToDeviceXRel( tsize ) >= CHAR_SIZE_MIN ) // Not drawable when size too small.
if( aDC->LogicalToDeviceXRel( tsize ) >= CHAR_SIZE_MIN ) // Not drawable when size too small.
#else
if( aDrawInfo.m_Scale * tsize >= CHAR_SIZE_MIN ) // Not drawable when size too small.
#endif
......@@ -624,7 +624,7 @@ void D_PAD::DrawShape( EDA_Rect* aClipBox, wxDC* aDC, PAD_DRAWINFO& aDrawInfo )
tsize = min( AreaSize.y, AreaSize.x / shortname_len );
#ifdef USE_WX_ZOOM
if( DC->LogicalToDeviceXRel( tsize ) >= CHAR_SIZE_MIN ) // Not drawable in size too small.
if( aDC->LogicalToDeviceXRel( tsize ) >= CHAR_SIZE_MIN ) // Not drawable in size too small.
#else
if( aDrawInfo.m_Scale * tsize >= CHAR_SIZE_MIN ) // Not drawable in size too small.
#endif
......
......@@ -132,9 +132,9 @@ void DIALOG_PAD_PROPERTIES::OnPaintShowPanel( wxPaintEvent& event )
// Give a margin
scale *= 0.7;
dc.SetUserScale( scale, scale );
drawInfo.m_Scale = scale;
#ifndef USE_WX_ZOOM
drawInfo.m_Scale = scale;
wxPoint org = ActiveScreen->m_DrawOrg;
wxPoint strt = ActiveScreen->m_StartVisu;
int pzoom = ActiveScreen->GetZoom();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment