pcbnew: Force rebuild of layer pair icon on menu creation

Fixes: lp:1838158
* https://bugs.launchpad.net/kicad/+bug/1838158
This commit is contained in:
Ian McInerney 2019-07-29 00:39:24 +02:00 committed by Jeff Young
parent b432a718ab
commit b70df18939
2 changed files with 5 additions and 5 deletions

View File

@ -554,7 +554,7 @@ public:
/* toolbars update UI functions: */
void PrepareLayerIndicator();
void PrepareLayerIndicator( bool aForceRebuild = false );
void ToggleLayersManager();
void ToggleMicrowaveToolbar();

View File

@ -84,11 +84,11 @@ static const char s_BitmapLayerIcon[BM_LAYERICON_SIZE][BM_LAYERICON_SIZE] =
};
void PCB_EDIT_FRAME::PrepareLayerIndicator()
void PCB_EDIT_FRAME::PrepareLayerIndicator( bool aForceRebuild )
{
int ii, jj;
COLOR4D active_layer_color, top_color, bottom_color, via_color, background_color;
bool change = false;
bool change = aForceRebuild;
static int previous_requested_scale;
static COLOR4D previous_active_layer_color = COLOR4D::UNSPECIFIED;
@ -283,7 +283,7 @@ void PCB_EDIT_FRAME::ReCreateHToolbar()
m_mainToolBar->AddControl( m_SelLayerBox );
m_mainToolBar->Add( PCB_ACTIONS::selectLayerPair );
PrepareLayerIndicator(); // Initialize the bitmap with the active layer colors
PrepareLayerIndicator( true ); // Force rebuild of the bitmap with the active layer colors
KiScaledSeparator( m_mainToolBar, this );
m_mainToolBar->Add( PCB_ACTIONS::showEeschema );