Browse Source

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
pull/13/head
Seth Hillbrand 7 years ago
parent
commit
1ee579c821
  1. 10
      pcbnew/tools/drawing_tool.cpp

10
pcbnew/tools/drawing_tool.cpp

@ -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…
Cancel
Save