Commit 6d51d2ae authored by charras's avatar charras
Browse files

Pcbnew Set ALL via holes to default does not work

parent 6bd572f5
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -498,7 +498,7 @@ void WinEDA_PcbFrame::createPopupMenuForTracks( TRACK* Track, wxMenu* PopMenu )
                _( "Export via hole to others id vias" ), global_options_pad_xpm );
                _( "Export via hole to others id vias" ), global_options_pad_xpm );
            ADD_MENUITEM( via_mnu, ID_POPUP_PCB_VIA_HOLE_RESET_TO_DEFAULT,
            ADD_MENUITEM( via_mnu, ID_POPUP_PCB_VIA_HOLE_RESET_TO_DEFAULT,
                _( "Set ALL via holes to default" ), apply_xpm );
                _( "Set ALL via holes to default" ), apply_xpm );
            if( !Track->IsDrillDefault() )
            if( Track->IsDrillDefault() )   // Can't export the drill value, because this value is 0
            {
            {
                via_mnu->Enable( ID_POPUP_PCB_VIA_HOLE_EXPORT, FALSE );
                via_mnu->Enable( ID_POPUP_PCB_VIA_HOLE_EXPORT, FALSE );
            }
            }
+2 −2
Original line number Original line Diff line number Diff line
@@ -88,11 +88,11 @@ void WinEDA_PcbFrame::Via_Edit_Control( wxDC* DC, int command_type, SEGVIA* via


    case ID_POPUP_PCB_VIA_HOLE_RESET_TO_DEFAULT:        // Reset all via hole to default value
    case ID_POPUP_PCB_VIA_HOLE_RESET_TO_DEFAULT:        // Reset all via hole to default value
        via_struct = m_Pcb->m_Track;
        via_struct = m_Pcb->m_Track;
        for( ; via_struct != NULL; via_struct = (TRACK*) via_struct->Pnext )
        for( ; via_struct != NULL; via_struct = via_struct->Next() )
        {
        {
            if( via_struct->Type() == TYPEVIA )     /* mise a jour du diametre de la via */
            if( via_struct->Type() == TYPEVIA )     /* mise a jour du diametre de la via */
            {
            {
                if( via_struct->IsDrillDefault() )
                if( ! via_struct->IsDrillDefault() )
                {
                {
                    via_struct->Draw( DrawPanel, DC, GR_XOR );
                    via_struct->Draw( DrawPanel, DC, GR_XOR );
                    via_struct->SetDrillDefault();
                    via_struct->SetDrillDefault();