Commit 6d51d2ae authored by charras's avatar charras

Pcbnew Set ALL via holes to default does not work

parent 6bd572f5
......@@ -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 );
}
......
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment