Ensure connection sheet is properly reset at reinit time

This commit is contained in:
Jon Evans 2019-05-04 22:23:35 -04:00
parent e0ada1379f
commit 2f2d48938e
2 changed files with 9 additions and 2 deletions

View File

@ -1107,7 +1107,10 @@ void CONNECTION_GRAPH::buildConnectionGraph()
aSubgraph->m_sheet );
c->SetName( static_cast<SCH_PIN *>( possible_driver )->GetName() );
connections_to_check.push_back( c );
wxLogTrace( "CONN", "Adding secondary pin %s", c->Name( true ) );
wxLogTrace( "CONN", "%lu (%s): Adding secondary pin %s",
aSubgraph->m_code,
aSubgraph->m_driver_connection->Name( true ),
c->Name( true ) );
}
break;
}
@ -1120,7 +1123,10 @@ void CONNECTION_GRAPH::buildConnectionGraph()
aSubgraph->m_sheet );
c->SetName( static_cast<SCH_TEXT*>( possible_driver )->GetShownText() );
connections_to_check.push_back( c );
wxLogTrace( "CONN", "Adding secondary label %s", c->Name( true ) );
wxLogTrace( "CONN", "%lu (%s): Adding secondary label %s",
aSubgraph->m_code,
aSubgraph->m_driver_connection->Name( true ),
c->Name( true ) );
break;
}

View File

@ -117,6 +117,7 @@ SCH_CONNECTION* SCH_ITEM::InitializeConnection( const SCH_SHEET_PATH& aSheet )
if( Connection( aSheet ) )
{
Connection( aSheet )->Reset();
Connection( aSheet )->SetSheet( aSheet );
return Connection( aSheet );
}