diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index 51e0008a5e..413e1ac12d 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -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 ); diff --git a/pcbnew/router/router_tool.h b/pcbnew/router/router_tool.h index 52afd76be1..2b487b3103 100644 --- a/pcbnew/router/router_tool.h +++ b/pcbnew/router/router_tool.h @@ -90,6 +90,7 @@ private: std::shared_ptr m_trackViaMenu; int m_lastTargetLayer; + PCB_LAYER_ID m_originalActiveLayer; }; #endif