PCB Router: return to original active layer after routing
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/12313
(cherry picked from commit fa3e9efdce
)
This commit is contained in:
parent
6ca2f6a6e1
commit
6289a82a18
|
@ -1117,6 +1117,7 @@ bool ROUTER_TOOL::prepareInteractive()
|
|||
return false;
|
||||
}
|
||||
|
||||
m_originalActiveLayer = editFrame->GetActiveLayer();
|
||||
editFrame->SetActiveLayer( ToLAYER_ID( routingLayer ) );
|
||||
|
||||
if( !getView()->IsLayerVisible( routingLayer ) )
|
||||
|
@ -1176,6 +1177,7 @@ bool ROUTER_TOOL::finishInteractive()
|
|||
m_startItem = nullptr;
|
||||
m_endItem = nullptr;
|
||||
|
||||
frame()->SetActiveLayer( m_originalActiveLayer );
|
||||
UpdateMessagePanel();
|
||||
frame()->GetCanvas()->SetCurrentCursor( KICURSOR::ARROW );
|
||||
controls()->SetAutoPan( false );
|
||||
|
|
|
@ -92,6 +92,7 @@ private:
|
|||
int m_lastTargetLayer;
|
||||
|
||||
bool m_inRouterTool; // Re-entrancy guard
|
||||
PCB_LAYER_ID m_originalActiveLayer;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue