pcbnew: Set graphic line width based on layer

Get the board settings when changing the drawing layer.  These include
default line thickness that should be updated.

Fixes: lp:1796489
* https://bugs.launchpad.net/kicad/+bug/1796489
This commit is contained in:
Seth Hillbrand 2018-10-06 21:38:37 -07:00
parent 821b10a37e
commit 1ee579c821
1 changed files with 10 additions and 0 deletions

View File

@ -1064,7 +1064,9 @@ bool DRAWING_TOOL::drawSegment( int aShape, DRAWSEGMENT*& aGraphic,
}
else if( evt->IsAction( &PCB_ACTIONS::layerChanged ) )
{
m_lineWidth = getSegmentWidth( getDrawingLayer() );
aGraphic->SetLayer( getDrawingLayer() );
aGraphic->SetWidth( m_lineWidth );
m_view->Update( &preview );
frame()->SetMsgPanel( aGraphic );
}
@ -1266,6 +1268,14 @@ bool DRAWING_TOOL::drawArc( DRAWSEGMENT*& aGraphic )
aGraphic = nullptr;
break;
}
else if( evt->IsAction( &PCB_ACTIONS::layerChanged ) )
{
m_lineWidth = getSegmentWidth( getDrawingLayer() );
aGraphic->SetLayer( getDrawingLayer() );
aGraphic->SetWidth( m_lineWidth );
m_view->Update( &preview );
frame()->SetMsgPanel( aGraphic );
}
else if( evt->IsClick( BUT_RIGHT ) )
{
m_menu.ShowContextMenu();