Commit 0163b589 authored by Maciej Suminski's avatar Maciej Suminski

Workarounded restoring focus to GAL canvas after layer switching.

parent b1837615
......@@ -830,6 +830,7 @@ void PCB_EDIT_FRAME::SetActiveLayer( LAYER_ID aLayer )
if( IsGalCanvasActive() )
{
m_toolManager->RunAction( COMMON_ACTIONS::layerChanged ); // notify other tools
GetGalCanvas()->SetFocus(); // otherwise hotkeys are stuck somewhere
GetGalCanvas()->Refresh();
}
}
......
......@@ -532,9 +532,7 @@ void ROUTER_TOOL::performRouting()
}
m_router->SwitchLayer( m_startLayer );
frame->SetActiveLayer( ToLAYER_ID( m_startLayer ) );
frame->GetGalCanvas()->SetFocus();
if( m_startItem && m_startItem->Net() >= 0 )
highlightNet( true, m_startItem->Net() );
......
......@@ -298,7 +298,6 @@ int PCBNEW_CONTROL::LayerSwitch( TOOL_EVENT& aEvent )
else if( aEvent.IsAction( &COMMON_ACTIONS::layerBottom ) )
m_frame->SwitchLayer( NULL, B_Cu );
m_frame->GetGalCanvas()->SetFocus();
setTransitions();
return 0;
......@@ -325,8 +324,8 @@ int PCBNEW_CONTROL::LayerNext( TOOL_EVENT& aEvent )
else
++layer;
assert( IsCopperLayer( layer ) );
editFrame->SwitchLayer( NULL, ToLAYER_ID( layer ) );
editFrame->GetGalCanvas()->SetFocus();
setTransitions();
return 0;
......@@ -355,7 +354,6 @@ int PCBNEW_CONTROL::LayerPrev( TOOL_EVENT& aEvent )
assert( IsCopperLayer( layer ) );
editFrame->SwitchLayer( NULL, ToLAYER_ID( layer ) );
editFrame->GetGalCanvas()->SetFocus();
setTransitions();
return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment