Router tool: ensure a internal layer exists when placing a microvia.
Fix also a minor compil warning. Fixes #8931 https://gitlab.com/kicad/code/kicad/issues/8931
This commit is contained in:
parent
1332208ab1
commit
fa82fcb809
|
@ -153,7 +153,8 @@ private:
|
|||
UNIT_BINDER m_offsetX, m_offsetY;
|
||||
UNIT_BINDER m_padToDie;
|
||||
UNIT_BINDER m_trapDelta;
|
||||
UNIT_BINDER m_cornerRatio, m_cornerRadius;
|
||||
UNIT_BINDER m_cornerRadius;
|
||||
UNIT_BINDER m_cornerRatio;
|
||||
UNIT_BINDER m_chamferRatio;
|
||||
UNIT_BINDER m_mixedCornerRatio, m_mixedChamferRatio;
|
||||
UNIT_BINDER m_holeX, m_holeY;
|
||||
|
|
|
@ -890,7 +890,11 @@ int ROUTER_TOOL::handleLayerSwitch( const TOOL_EVENT& aEvent, bool aForceVia )
|
|||
{
|
||||
// front-side microvia
|
||||
currentLayer = F_Cu;
|
||||
targetLayer = In1_Cu;
|
||||
|
||||
if( layerCount > 2 ) // Ensure the inner layer In1_Cu exists
|
||||
targetLayer = In1_Cu;
|
||||
else
|
||||
targetLayer = B_Cu;
|
||||
}
|
||||
else if( currentLayer == B_Cu || currentLayer == layerCount - 2 )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue