Commit c4948a6c authored by jean-pierre charras's avatar jean-pierre charras

gerbview: fix an issue when using layer list in toolbar to select layer (back...

gerbview: fix an issue when using layer list in toolbar to select layer (back to old layer under Linux)
Refresh screen when active layer is changed from the layer manager.
parents 28774e41 2f4d4879
......@@ -202,9 +202,10 @@ bool GERBER_LAYER_WIDGET::OnLayerSelect( int aLayer )
{
// the layer change from the GERBER_LAYER_WIDGET can be denied by returning
// false from this function.
int layer = myframe->getActiveLayer( );
myframe->setActiveLayer( aLayer, false );
myframe->syncLayerBox();
if(DisplayOpt.ContrastModeDisplay)
if( layer != myframe->getActiveLayer( ) )
myframe->DrawPanel->Refresh();
return true;
......
......@@ -138,8 +138,12 @@ void GERBVIEW_FRAME::Process_Special_Functions( wxCommandEvent& event )
break;
case ID_TOOLBARH_GERBVIEW_SELECT_LAYER:
setActiveLayer(m_SelLayerBox->GetChoice());
DrawPanel->ReDraw( &dc, false );
{
int layer = getActiveLayer( );
setActiveLayer(event.GetSelection());
if( layer != getActiveLayer( ) )
DrawPanel->ReDraw( &dc, false );
}
break;
case ID_TOOLBARH_GERBER_SELECT_TOOL:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment