diff --git a/pcbnew/onrightclick.cpp b/pcbnew/onrightclick.cpp index a789562681..1dbd090282 100644 --- a/pcbnew/onrightclick.cpp +++ b/pcbnew/onrightclick.cpp @@ -498,7 +498,7 @@ void WinEDA_PcbFrame::createPopupMenuForTracks( TRACK* Track, wxMenu* PopMenu ) _( "Export via hole to others id vias" ), global_options_pad_xpm ); ADD_MENUITEM( via_mnu, ID_POPUP_PCB_VIA_HOLE_RESET_TO_DEFAULT, _( "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 ); } diff --git a/pcbnew/via_edit.cpp b/pcbnew/via_edit.cpp index fe4cab67a6..58a791d01a 100644 --- a/pcbnew/via_edit.cpp +++ b/pcbnew/via_edit.cpp @@ -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 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->IsDrillDefault() ) + if( ! via_struct->IsDrillDefault() ) { via_struct->Draw( DrawPanel, DC, GR_XOR ); via_struct->SetDrillDefault();