Commit ae12e698 authored by charras's avatar charras

fixed a minor problem in pcbnew compiled in DEBUG mode, that prints a lot of...

fixed a minor problem in pcbnew compiled in DEBUG mode, that prints a lot of error messages when loading a board
parent 71e537b0
......@@ -890,7 +890,8 @@ NETINFO_ITEM* BOARD::FindNet( int anetcode ) const
{
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
......
......@@ -62,15 +62,6 @@ int NETINFO_ITEM:: ReadDescr( FILE* File, int* LineNum )
m_Netname = CONV_FROM_UTF8( Ltmp );
continue;
}
/*
if( strncmp( Line, "NetClass", 8 ) == 0 )
{
ReadDelimitedText( Ltmp, Line + 8, sizeof(Ltmp) );
m_NetClassName = CONV_FROM_UTF8( Ltmp );
continue;
}
*/
}
return 1;
......
......@@ -139,6 +139,16 @@ void NETINFO_LIST::BuildListOfNets()
m_Parent->m_Status_Pcb |= NET_CODES_OK;
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
Affiche_Message( wxEmptyString );
BestZoom();
GetBoard()->m_Status_Pcb = 0;
// Build the net info list
GetBoard()->m_NetInfo->BuildListOfNets();
board->SynchronizeNetsAndNetClasses( );
board->m_Status_Pcb = 0;
m_TrackAndViasSizesList_Changed = true;
Affiche_Message( wxEmptyString );
BestZoom();
SetToolbars();
return 1;
}
......@@ -1036,7 +1038,8 @@ int WinEDA_PcbFrame::SavePcbFormatAscii( FILE* aFile )
fprintf( aFile, "# Created by Pcbnew%s\n\n", CONV_TO_UTF8( GetBuildVersion() ) );
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( ));
m_TrackAndViasSizesList_Changed = true;
AuxiliaryToolBar_Update_UI();
......
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