Scale polygon drawing guides with zoom.

Fixes https://gitlab.com/kicad/code/kicad/issues/4769

(cherry picked from commit e26625fc99)
This commit is contained in:
Jeff Young 2020-07-01 17:14:47 +01:00
parent a370d69542
commit ee96937fd4
1 changed files with 2 additions and 2 deletions

View File

@ -31,7 +31,7 @@
using namespace KIGFX::PREVIEW; using namespace KIGFX::PREVIEW;
const double POLYGON_ITEM::POLY_LINE_WIDTH = 150000.0; const double POLYGON_ITEM::POLY_LINE_WIDTH = 1;
POLYGON_ITEM::POLYGON_ITEM(): POLYGON_ITEM::POLYGON_ITEM():
SIMPLE_OVERLAY_ITEM() SIMPLE_OVERLAY_ITEM()
@ -61,7 +61,7 @@ void POLYGON_ITEM::drawPreviewShape( KIGFX::VIEW* aView ) const
auto& gal = *aView->GetGAL(); auto& gal = *aView->GetGAL();
auto rs = static_cast<KIGFX::PCB_RENDER_SETTINGS*>( aView->GetPainter()->GetSettings() ); auto rs = static_cast<KIGFX::PCB_RENDER_SETTINGS*>( aView->GetPainter()->GetSettings() );
gal.SetLineWidth( POLY_LINE_WIDTH ); gal.SetLineWidth( (float) aView->ToWorld( POLY_LINE_WIDTH ) );
gal.DrawPolyline( m_lockedChain ); gal.DrawPolyline( m_lockedChain );
// draw the leader line in a different color // draw the leader line in a different color