bool PCB_LAYER_WIDGET::OnLayerSelect( int aLayer ) { // the layer change from the PCB_LAYER_WIDGET can be denied by returning // false from this function. myframe->SetActiveLayer( ToLAYER_ID( aLayer ) ); if( m_alwaysShowActiveCopperLayer ) OnLayerSelected(); else if( DisplayOpt.ContrastModeDisplay ) myframe->GetCanvas()->Refresh(); return true; }
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( layer != myframe->getActiveLayer( ) ) { if( ! OnLayerSelected() ) myframe->GetCanvas()->Refresh(); } return true; }
bool PCB_LAYER_WIDGET::OnLayerSelect( int aLayer ) { // the layer change from the PCB_LAYER_WIDGET can be denied by returning // false from this function. PCB_LAYER_ID layer = ToLAYER_ID( aLayer ); if( m_fp_editor_mode && LSET::ForbiddenFootprintLayers().test( layer ) ) return false; myframe->SetActiveLayer( layer ); PCB_DISPLAY_OPTIONS* displ_opts = (PCB_DISPLAY_OPTIONS*)myframe->GetDisplayOptions(); if( m_alwaysShowActiveCopperLayer ) OnLayerSelected(); else if( displ_opts->m_ContrastModeDisplay ) myframe->GetCanvas()->Refresh(); return true; }