Handle active layer overloading
Setting the active layer should be tied to the events that are triggered by the layer change and overloaded for each frame. This ties the hotkey back to these events. Fixes: lp:1838244 * https://bugs.launchpad.net/kicad/+bug/1838244
This commit is contained in:
parent
0d3f6a4930
commit
494d0de9b8
|
@ -279,7 +279,7 @@ void ZONE_CONTAINER::Print( PCB_BASE_FRAME* aFrame, wxDC* DC, const wxPoint& off
|
|||
return;
|
||||
|
||||
wxPoint seg_start, seg_end;
|
||||
PCB_LAYER_ID curr_layer = ( (PCB_SCREEN*) aFrame->GetScreen() )->m_Active_Layer;
|
||||
PCB_LAYER_ID curr_layer = aFrame->GetActiveLayer();
|
||||
BOARD* brd = GetBoard();
|
||||
PCB_LAYER_ID draw_layer = UNDEFINED_LAYER;
|
||||
|
||||
|
|
|
@ -372,9 +372,11 @@ void FOOTPRINT_EDIT_FRAME::SetActiveLayer( PCB_LAYER_ID aLayer )
|
|||
{
|
||||
PCB_BASE_FRAME::SetActiveLayer( aLayer );
|
||||
|
||||
m_Layers->SelectLayer( GetActiveLayer() );
|
||||
m_Layers->SelectLayer( aLayer );
|
||||
m_Layers->OnLayerSelected();
|
||||
|
||||
m_toolManager->RunAction( PCB_ACTIONS::layerChanged ); // notify other tools
|
||||
GetCanvas()->SetFocus(); // allow capture of hotkeys
|
||||
GetCanvas()->SetHighContrastLayer( aLayer );
|
||||
GetCanvas()->Refresh();
|
||||
}
|
||||
|
|
|
@ -439,7 +439,7 @@ void PCB_BASE_FRAME::SwitchLayer( wxDC* DC, PCB_LAYER_ID layer )
|
|||
// layer, or when switching between a copper layer and a non-copper layer, or vice-versa?
|
||||
// ...
|
||||
|
||||
GetScreen()->m_Active_Layer = layer;
|
||||
SetActiveLayer( layer );
|
||||
|
||||
if( displ_opts->m_ContrastModeDisplay )
|
||||
GetCanvas()->Refresh();
|
||||
|
|
Loading…
Reference in New Issue