Workarounded restoring focus to GAL canvas after layer switching.

This commit is contained in:
Maciej Suminski 2014-07-09 16:44:22 +02:00
parent b1837615aa
commit 0163b589b4
3 changed files with 2 additions and 5 deletions

View File

@ -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();
}
}

View File

@ -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() );

View File

@ -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;