Workarounded restoring focus to GAL canvas after layer switching.
This commit is contained in:
parent
b1837615aa
commit
0163b589b4
|
@ -830,6 +830,7 @@ void PCB_EDIT_FRAME::SetActiveLayer( LAYER_ID aLayer )
|
||||||
if( IsGalCanvasActive() )
|
if( IsGalCanvasActive() )
|
||||||
{
|
{
|
||||||
m_toolManager->RunAction( COMMON_ACTIONS::layerChanged ); // notify other tools
|
m_toolManager->RunAction( COMMON_ACTIONS::layerChanged ); // notify other tools
|
||||||
|
GetGalCanvas()->SetFocus(); // otherwise hotkeys are stuck somewhere
|
||||||
GetGalCanvas()->Refresh();
|
GetGalCanvas()->Refresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -532,9 +532,7 @@ void ROUTER_TOOL::performRouting()
|
||||||
}
|
}
|
||||||
|
|
||||||
m_router->SwitchLayer( m_startLayer );
|
m_router->SwitchLayer( m_startLayer );
|
||||||
|
|
||||||
frame->SetActiveLayer( ToLAYER_ID( m_startLayer ) );
|
frame->SetActiveLayer( ToLAYER_ID( m_startLayer ) );
|
||||||
frame->GetGalCanvas()->SetFocus();
|
|
||||||
|
|
||||||
if( m_startItem && m_startItem->Net() >= 0 )
|
if( m_startItem && m_startItem->Net() >= 0 )
|
||||||
highlightNet( true, m_startItem->Net() );
|
highlightNet( true, m_startItem->Net() );
|
||||||
|
|
|
@ -298,7 +298,6 @@ int PCBNEW_CONTROL::LayerSwitch( TOOL_EVENT& aEvent )
|
||||||
else if( aEvent.IsAction( &COMMON_ACTIONS::layerBottom ) )
|
else if( aEvent.IsAction( &COMMON_ACTIONS::layerBottom ) )
|
||||||
m_frame->SwitchLayer( NULL, B_Cu );
|
m_frame->SwitchLayer( NULL, B_Cu );
|
||||||
|
|
||||||
m_frame->GetGalCanvas()->SetFocus();
|
|
||||||
setTransitions();
|
setTransitions();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -325,8 +324,8 @@ int PCBNEW_CONTROL::LayerNext( TOOL_EVENT& aEvent )
|
||||||
else
|
else
|
||||||
++layer;
|
++layer;
|
||||||
|
|
||||||
|
assert( IsCopperLayer( layer ) );
|
||||||
editFrame->SwitchLayer( NULL, ToLAYER_ID( layer ) );
|
editFrame->SwitchLayer( NULL, ToLAYER_ID( layer ) );
|
||||||
editFrame->GetGalCanvas()->SetFocus();
|
|
||||||
setTransitions();
|
setTransitions();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -355,7 +354,6 @@ int PCBNEW_CONTROL::LayerPrev( TOOL_EVENT& aEvent )
|
||||||
|
|
||||||
assert( IsCopperLayer( layer ) );
|
assert( IsCopperLayer( layer ) );
|
||||||
editFrame->SwitchLayer( NULL, ToLAYER_ID( layer ) );
|
editFrame->SwitchLayer( NULL, ToLAYER_ID( layer ) );
|
||||||
editFrame->GetGalCanvas()->SetFocus();
|
|
||||||
setTransitions();
|
setTransitions();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue