Update call signature for SwitchLayer
We don't use DC anymore
This commit is contained in:
parent
77fbb495f2
commit
9884f40952
|
@ -351,7 +351,12 @@ public:
|
|||
PCB_LAYER_ID SelectOneLayer( PCB_LAYER_ID aDefaultLayer, LSET aNotAllowedLayersMask = LSET(),
|
||||
wxPoint aDlgPosition = wxDefaultPosition );
|
||||
|
||||
virtual void SwitchLayer( wxDC* DC, PCB_LAYER_ID layer );
|
||||
/**
|
||||
* Change the active layer in the frame
|
||||
*
|
||||
* @param aLayer New layer to make active
|
||||
*/
|
||||
virtual void SwitchLayer( PCB_LAYER_ID aLayer );
|
||||
|
||||
virtual void SetActiveLayer( PCB_LAYER_ID aLayer ) { GetScreen()->m_Active_Layer = aLayer; }
|
||||
virtual PCB_LAYER_ID GetActiveLayer() const { return GetScreen()->m_Active_Layer; }
|
||||
|
|
|
@ -75,7 +75,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
|||
}
|
||||
|
||||
|
||||
void PCB_EDIT_FRAME::SwitchLayer( wxDC* DC, PCB_LAYER_ID layer )
|
||||
void PCB_EDIT_FRAME::SwitchLayer( PCB_LAYER_ID layer )
|
||||
{
|
||||
PCB_LAYER_ID curLayer = GetActiveLayer();
|
||||
auto displ_opts = GetDisplayOptions();
|
||||
|
|
|
@ -576,7 +576,7 @@ EDA_3D_VIEWER_FRAME* PCB_BASE_FRAME::CreateAndShow3D_Frame()
|
|||
}
|
||||
|
||||
|
||||
void PCB_BASE_FRAME::SwitchLayer( wxDC* DC, PCB_LAYER_ID layer )
|
||||
void PCB_BASE_FRAME::SwitchLayer( PCB_LAYER_ID layer )
|
||||
{
|
||||
PCB_LAYER_ID preslayer = GetActiveLayer();
|
||||
auto& displ_opts = GetDisplayOptions();
|
||||
|
|
|
@ -548,7 +548,12 @@ public:
|
|||
*/
|
||||
void OnEditItemRequest( BOARD_ITEM* aItem ) override;
|
||||
|
||||
void SwitchLayer( wxDC* DC, PCB_LAYER_ID layer ) override;
|
||||
/**
|
||||
* Change the active layer in the editor
|
||||
*
|
||||
* @param layer New layer to make active
|
||||
*/
|
||||
void SwitchLayer( PCB_LAYER_ID layer ) override;
|
||||
|
||||
/**
|
||||
* Modify one track segment width or one via diameter (using DRC control).
|
||||
|
|
|
@ -354,7 +354,7 @@ int PCB_CONTROL::RatsnestModeCycle( const TOOL_EVENT& aEvent )
|
|||
|
||||
int PCB_CONTROL::LayerSwitch( const TOOL_EVENT& aEvent )
|
||||
{
|
||||
m_frame->SwitchLayer( nullptr, aEvent.Parameter<PCB_LAYER_ID>() );
|
||||
m_frame->SwitchLayer( aEvent.Parameter<PCB_LAYER_ID>() );
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -380,7 +380,7 @@ int PCB_CONTROL::LayerNext( const TOOL_EVENT& aEvent )
|
|||
}
|
||||
|
||||
wxCHECK( IsCopperLayer( layer ), 0 );
|
||||
editFrame->SwitchLayer( nullptr, ToLAYER_ID( layer ) );
|
||||
editFrame->SwitchLayer( ToLAYER_ID( layer ) );
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -410,7 +410,7 @@ int PCB_CONTROL::LayerPrev( const TOOL_EVENT& aEvent )
|
|||
|
||||
|
||||
wxCHECK( IsCopperLayer( layer ), 0 );
|
||||
editFrame->SwitchLayer( nullptr, ToLAYER_ID( layer ) );
|
||||
editFrame->SwitchLayer( ToLAYER_ID( layer ) );
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -422,9 +422,9 @@ int PCB_CONTROL::LayerToggle( const TOOL_EVENT& aEvent )
|
|||
PCB_SCREEN* screen = m_frame->GetScreen();
|
||||
|
||||
if( currentLayer == screen->m_Route_Layer_TOP )
|
||||
m_frame->SwitchLayer( nullptr, screen->m_Route_Layer_BOTTOM );
|
||||
m_frame->SwitchLayer( screen->m_Route_Layer_BOTTOM );
|
||||
else
|
||||
m_frame->SwitchLayer( nullptr, screen->m_Route_Layer_TOP );
|
||||
m_frame->SwitchLayer( screen->m_Route_Layer_TOP );
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue