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:
parent
ab3564f12d
commit
04c6b79350
|
@ -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 )
|
void SCH_SCREEN::Print( const RENDER_SETTINGS* aSettings )
|
||||||
{
|
{
|
||||||
// Ensure links are up to date, even if a library was reloaded for some reason:
|
// Ensure links are up to date, even if a library was reloaded for some reason:
|
||||||
|
|
|
@ -225,8 +225,6 @@ public:
|
||||||
*/
|
*/
|
||||||
void UpdateLocalLibSymbolLinks();
|
void UpdateLocalLibSymbolLinks();
|
||||||
|
|
||||||
void SwapSymbolLinks( const SCH_SYMBOL* aOriginalSymbol, const SCH_SYMBOL* aNewSymbol );
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Print all the items in the screen to \a aDC.
|
* Print all the items in the screen to \a aDC.
|
||||||
*
|
*
|
||||||
|
|
|
@ -316,22 +316,7 @@ void SCH_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList )
|
||||||
switch( status )
|
switch( status )
|
||||||
{
|
{
|
||||||
case UNDO_REDO::CHANGED:
|
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 );
|
item->SwapData( alt_item );
|
||||||
|
|
||||||
if( item->Type() == SCH_SYMBOL_T )
|
|
||||||
static_cast<SCH_SYMBOL*>( item )->UpdatePins();
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case UNDO_REDO::EXCHANGE_T:
|
case UNDO_REDO::EXCHANGE_T:
|
||||||
|
|
Loading…
Reference in New Issue