Fix from master branch: lp:1635723 (pcbnew: allows sometimes to draw tracks in non copper layers in Gal Mode)

This commit is contained in:
jean-pierre charras 2016-11-13 19:03:52 +01:00
parent 18f77b894e
commit 65fe561a4b
1 changed files with 7 additions and 0 deletions

View File

@ -486,6 +486,13 @@ bool ROUTER_TOOL::onViaCommand( TOOL_EVENT& aEvent, VIATYPE_T aType )
bool ROUTER_TOOL::prepareInteractive()
{
int routingLayer = getStartLayer( m_startItem );
if( !IsCopperLayer( routingLayer ) )
{
DisplayError( m_frame, _( "Tracks on Copper layers only " ) );
return false;
}
m_frame->SetActiveLayer( ToLAYER_ID( routingLayer ) );
// fixme: switch on invisible layer