Fix a serious error in SetActiveLayer(): a GAL specific method was called even if a GAL mode was not active
This commit is contained in:
parent
6ae65b4cba
commit
b66cb871e6
|
@ -979,11 +979,12 @@ void FOOTPRINT_EDIT_FRAME::SetActiveLayer( LAYER_ID aLayer )
|
||||||
{
|
{
|
||||||
PCB_BASE_FRAME::SetActiveLayer( aLayer );
|
PCB_BASE_FRAME::SetActiveLayer( aLayer );
|
||||||
|
|
||||||
GetGalCanvas()->SetHighContrastLayer( aLayer );
|
|
||||||
|
|
||||||
m_Layers->SelectLayer( GetActiveLayer() );
|
m_Layers->SelectLayer( GetActiveLayer() );
|
||||||
m_Layers->OnLayerSelected();
|
m_Layers->OnLayerSelected();
|
||||||
|
|
||||||
if( IsGalCanvasActive() )
|
if( IsGalCanvasActive() )
|
||||||
|
{
|
||||||
|
GetGalCanvas()->SetHighContrastLayer( aLayer );
|
||||||
GetGalCanvas()->Refresh();
|
GetGalCanvas()->Refresh();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -877,14 +877,14 @@ void PCB_EDIT_FRAME::SetActiveLayer( LAYER_ID aLayer )
|
||||||
{
|
{
|
||||||
PCB_BASE_FRAME::SetActiveLayer( aLayer );
|
PCB_BASE_FRAME::SetActiveLayer( aLayer );
|
||||||
|
|
||||||
GetGalCanvas()->SetHighContrastLayer( aLayer );
|
|
||||||
|
|
||||||
syncLayerWidgetLayer();
|
syncLayerWidgetLayer();
|
||||||
|
|
||||||
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()->SetFocus(); // otherwise hotkeys are stuck somewhere
|
||||||
|
|
||||||
|
GetGalCanvas()->SetHighContrastLayer( aLayer );
|
||||||
GetGalCanvas()->Refresh();
|
GetGalCanvas()->Refresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue