PCB Router: return to original active layer after routing

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/12313
This commit is contained in:
Mike Williams
2022-09-06 10:51:46 -04:00
parent 68f71e4a62
commit fa3e9efdce
2 changed files with 3 additions and 0 deletions
+2
View File
@@ -1129,6 +1129,7 @@ bool ROUTER_TOOL::prepareInteractive()
return false;
}
m_originalActiveLayer = editFrame->GetActiveLayer();
editFrame->SetActiveLayer( ToLAYER_ID( routingLayer ) );
if( !getView()->IsLayerVisible( routingLayer ) )
@@ -1188,6 +1189,7 @@ bool ROUTER_TOOL::finishInteractive()
m_startItem = nullptr;
m_endItem = nullptr;
frame()->SetActiveLayer( m_originalActiveLayer );
UpdateMessagePanel();
frame()->GetCanvas()->SetCurrentCursor( KICURSOR::ARROW );
controls()->SetAutoPan( false );
+1
View File
@@ -90,6 +90,7 @@ private:
std::shared_ptr<ACTION_MENU> m_trackViaMenu;
int m_lastTargetLayer;
PCB_LAYER_ID m_originalActiveLayer;
};
#endif