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.
This commit is contained in:
jean-pierre charras 2011-03-12 17:17:41 +01:00
commit c4948a6c0d
2 changed files with 8 additions and 3 deletions

View File

@ -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;

View File

@ -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: