Use the ACTION_ID offset when updating the layer pair bitmap.
This commit is contained in:
parent
b36f982272
commit
9f427da56f
|
@ -65,6 +65,12 @@ void ACTION_TOOLBAR::AddButton( const TOOL_ACTION& aAction )
|
|||
}
|
||||
|
||||
|
||||
void ACTION_TOOLBAR::SetToolBitmap( const TOOL_ACTION& aAction, const wxBitmap& aBitmap )
|
||||
{
|
||||
wxAuiToolBar::SetToolBitmap( aAction.GetId() + ACTION_ID, aBitmap );
|
||||
}
|
||||
|
||||
|
||||
void ACTION_TOOLBAR::Toggle( const TOOL_ACTION& aAction, bool aState )
|
||||
{
|
||||
int toolId = aAction.GetId() + ACTION_ID;
|
||||
|
|
|
@ -60,6 +60,13 @@ public:
|
|||
*/
|
||||
void AddButton( const TOOL_ACTION& aAction );
|
||||
|
||||
/**
|
||||
* Function SetToolBitmap()
|
||||
* Updates the bitmap of a particular tool. Not icon-based because we use it
|
||||
* for the custom-drawn layer pair bitmap.
|
||||
*/
|
||||
void SetToolBitmap( const TOOL_ACTION& aAction, const wxBitmap& aBitmap );
|
||||
|
||||
/**
|
||||
* Applies the default toggle action. For checked items this is check/uncheck; for
|
||||
* non-checked items it's enable/disable.
|
||||
|
|
|
@ -206,7 +206,7 @@ void PCB_EDIT_FRAME::PrepareLayerIndicator()
|
|||
|
||||
if( m_mainToolBar )
|
||||
{
|
||||
m_mainToolBar->SetToolBitmap( PCB_ACTIONS::selectLayerPair.GetId(), *LayerPairBitmap );
|
||||
m_mainToolBar->SetToolBitmap( PCB_ACTIONS::selectLayerPair, *LayerPairBitmap );
|
||||
m_mainToolBar->Refresh();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue