eeschema: Return CONNECTION when initing
This commit is contained in:
parent
bf051b5c41
commit
cf69cb5637
|
@ -117,17 +117,18 @@ void SCH_ITEM::AddConnectionTo( SCH_ITEM* aItem )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void SCH_ITEM::InitializeConnection( const SCH_SHEET_PATH& aSheet )
|
SCH_CONNECTION* SCH_ITEM::InitializeConnection( const SCH_SHEET_PATH& aSheet )
|
||||||
{
|
{
|
||||||
if( Connection( aSheet ) )
|
if( Connection( aSheet ) )
|
||||||
{
|
{
|
||||||
Connection( aSheet )->Reset();
|
Connection( aSheet )->Reset();
|
||||||
return;
|
return Connection( aSheet );
|
||||||
}
|
}
|
||||||
|
|
||||||
auto connection = new SCH_CONNECTION( this );
|
auto connection = new SCH_CONNECTION( this );
|
||||||
connection->SetSheet( aSheet );
|
connection->SetSheet( aSheet );
|
||||||
m_connection_map.insert( std::make_pair( aSheet, connection ) );
|
m_connection_map.insert( std::make_pair( aSheet, connection ) );
|
||||||
|
return connection;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -343,7 +343,7 @@ public:
|
||||||
*
|
*
|
||||||
* @param aPath is the sheet path to initialize
|
* @param aPath is the sheet path to initialize
|
||||||
*/
|
*/
|
||||||
void InitializeConnection( const SCH_SHEET_PATH& aPath );
|
SCH_CONNECTION* InitializeConnection( const SCH_SHEET_PATH& aPath );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns true if this item should propagate connection info to aItem
|
* Returns true if this item should propagate connection info to aItem
|
||||||
|
|
Loading…
Reference in New Issue