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:
commit
c4948a6c0d
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue