Eeschema: remove unused and unnecessary code.

When swapping SCH_SYMBOL objects during undo, no special processing is
required.  The SCH_PIN objects are updated when the LIB_SYMBOL objects
are swapped and the call to SCH_SCREEN::SwapSymbolLinks() didn't do
anything.
This commit is contained in:
Wayne Stambaugh 2021-08-11 14:30:29 -04:00
parent ab3564f12d
commit 04c6b79350
3 changed files with 0 additions and 27 deletions

View File

@ -726,16 +726,6 @@ void SCH_SCREEN::UpdateLocalLibSymbolLinks()
}
void SCH_SCREEN::SwapSymbolLinks( const SCH_SYMBOL* aOriginalSymbol, const SCH_SYMBOL* aNewSymbol )
{
wxCHECK( aOriginalSymbol && aNewSymbol /* && m_rtree.contains( aOriginalSymbol, true ) */,
/* void */ );
if( aOriginalSymbol->GetSchSymbolLibraryName() == aNewSymbol->GetSchSymbolLibraryName() )
return;
}
void SCH_SCREEN::Print( const RENDER_SETTINGS* aSettings )
{
// Ensure links are up to date, even if a library was reloaded for some reason:

View File

@ -225,8 +225,6 @@ public:
*/
void UpdateLocalLibSymbolLinks();
void SwapSymbolLinks( const SCH_SYMBOL* aOriginalSymbol, const SCH_SYMBOL* aNewSymbol );
/**
* Print all the items in the screen to \a aDC.
*

View File

@ -316,22 +316,7 @@ void SCH_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList )
switch( status )
{
case UNDO_REDO::CHANGED:
if( item->Type() == SCH_SYMBOL_T )
{
// Update the schematic library cache in case that was the change.
SCH_SYMBOL* symbol = dynamic_cast<SCH_SYMBOL*>( item );
SCH_SYMBOL* altSymbol = dynamic_cast<SCH_SYMBOL*>( alt_item );
wxCHECK( symbol && altSymbol, /* void */ );
screen->SwapSymbolLinks( symbol, altSymbol );
}
item->SwapData( alt_item );
if( item->Type() == SCH_SYMBOL_T )
static_cast<SCH_SYMBOL*>( item )->UpdatePins();
break;
case UNDO_REDO::EXCHANGE_T: