fixed a minor problem in pcbnew compiled in DEBUG mode, that prints a lot of error messages when loading a board
This commit is contained in:
parent
71e537b058
commit
ae12e69860
|
@ -890,7 +890,8 @@ NETINFO_ITEM* BOARD::FindNet( int anetcode ) const
|
||||||
{
|
{
|
||||||
if( anetcode != net->GetNet() )
|
if( anetcode != net->GetNet() )
|
||||||
{
|
{
|
||||||
printf("FindNet() anetcode %d != GetNet() %d\n", anetcode, net->GetNet());
|
printf("FindNet() anetcode %d != GetNet() %d (net: %s)\n",
|
||||||
|
anetcode, net->GetNet(), CONV_TO_UTF8(net->GetNetname()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -62,15 +62,6 @@ int NETINFO_ITEM:: ReadDescr( FILE* File, int* LineNum )
|
||||||
m_Netname = CONV_FROM_UTF8( Ltmp );
|
m_Netname = CONV_FROM_UTF8( Ltmp );
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
if( strncmp( Line, "NetClass", 8 ) == 0 )
|
|
||||||
{
|
|
||||||
ReadDelimitedText( Ltmp, Line + 8, sizeof(Ltmp) );
|
|
||||||
m_NetClassName = CONV_FROM_UTF8( Ltmp );
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
|
|
@ -139,6 +139,16 @@ void NETINFO_LIST::BuildListOfNets()
|
||||||
m_Parent->m_Status_Pcb |= NET_CODES_OK;
|
m_Parent->m_Status_Pcb |= NET_CODES_OK;
|
||||||
|
|
||||||
m_Parent->SetAreasNetCodesFromNetNames();
|
m_Parent->SetAreasNetCodesFromNetNames();
|
||||||
|
|
||||||
|
// For test and debug purposes only
|
||||||
|
#if 0
|
||||||
|
for( unsigned icnt = 0; icnt < GetCount(); icnt++)
|
||||||
|
{
|
||||||
|
wxLogWarning(wxT("icnt %d, netcode %d, netname <%s>\n"),
|
||||||
|
icnt, m_NetBuffer[icnt]->GetNet(),
|
||||||
|
GetChars( m_NetBuffer[icnt]->GetNetname() ) );
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -997,13 +997,15 @@ int WinEDA_PcbFrame::ReadPcbFile( FILE* File, bool Append )
|
||||||
|
|
||||||
SetLocaleTo_Default( ); // revert to the current locale
|
SetLocaleTo_Default( ); // revert to the current locale
|
||||||
|
|
||||||
Affiche_Message( wxEmptyString );
|
GetBoard()->m_Status_Pcb = 0;
|
||||||
|
// Build the net info list
|
||||||
BestZoom();
|
GetBoard()->m_NetInfo->BuildListOfNets();
|
||||||
|
|
||||||
board->SynchronizeNetsAndNetClasses( );
|
board->SynchronizeNetsAndNetClasses( );
|
||||||
board->m_Status_Pcb = 0;
|
|
||||||
m_TrackAndViasSizesList_Changed = true;
|
m_TrackAndViasSizesList_Changed = true;
|
||||||
|
Affiche_Message( wxEmptyString );
|
||||||
|
BestZoom();
|
||||||
SetToolbars();
|
SetToolbars();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -1036,7 +1038,8 @@ int WinEDA_PcbFrame::SavePcbFormatAscii( FILE* aFile )
|
||||||
fprintf( aFile, "# Created by Pcbnew%s\n\n", CONV_TO_UTF8( GetBuildVersion() ) );
|
fprintf( aFile, "# Created by Pcbnew%s\n\n", CONV_TO_UTF8( GetBuildVersion() ) );
|
||||||
|
|
||||||
GetBoard()->SynchronizeNetsAndNetClasses();
|
GetBoard()->SynchronizeNetsAndNetClasses();
|
||||||
// Select default Netclass. Useful to save default values in headers
|
// Select default Netclass before writing file.
|
||||||
|
// Useful to save default values in headers
|
||||||
GetBoard()->SetCurrentNetClass( GetBoard()->m_NetClasses.GetDefault()->GetName( ));
|
GetBoard()->SetCurrentNetClass( GetBoard()->m_NetClasses.GetDefault()->GetName( ));
|
||||||
m_TrackAndViasSizesList_Changed = true;
|
m_TrackAndViasSizesList_Changed = true;
|
||||||
AuxiliaryToolBar_Update_UI();
|
AuxiliaryToolBar_Update_UI();
|
||||||
|
|
Loading…
Reference in New Issue