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:
parent
821b10a37e
commit
1ee579c821
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue