Browse Source

Pcbnew Set ALL via holes to default does not work

pull/1/head
charras 17 years ago
parent
commit
6d51d2ae30
  1. 2
      pcbnew/onrightclick.cpp
  2. 4
      pcbnew/via_edit.cpp

2
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 );
}

4
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();

Loading…
Cancel
Save