In SetActiveLayer(): fix a potential bug, as a GAL method was called in Legacy mode.

This is a fix from commit b66cb871e6 in master branch.
This commit is contained in:
jean-pierre charras 2017-01-31 11:11:03 +01:00
parent df191606ab
commit 0145a03f79
2 changed files with 4 additions and 4 deletions

View File

@ -993,12 +993,13 @@ void FOOTPRINT_EDIT_FRAME::SetActiveLayer( LAYER_ID aLayer )
{
PCB_BASE_FRAME::SetActiveLayer( aLayer );
GetGalCanvas()->SetHighContrastLayer( aLayer );
m_Layers->SelectLayer( GetActiveLayer() );
m_Layers->OnLayerSelected();
if( IsGalCanvasActive() )
{
GetGalCanvas()->SetHighContrastLayer( aLayer );
GetGalCanvas()->Refresh();
}
}

View File

@ -845,14 +845,13 @@ void PCB_EDIT_FRAME::SetActiveLayer( LAYER_ID aLayer )
{
PCB_BASE_FRAME::SetActiveLayer( aLayer );
GetGalCanvas()->SetHighContrastLayer( aLayer );
syncLayerWidgetLayer();
if( IsGalCanvasActive() )
{
m_toolManager->RunAction( COMMON_ACTIONS::layerChanged ); // notify other tools
GetGalCanvas()->SetFocus(); // otherwise hotkeys are stuck somewhere
GetGalCanvas()->SetHighContrastLayer( aLayer );
GetGalCanvas()->Refresh();
}
}