Don't prune already-added items from the COMMIT.

We perform undo/redo backwards from each other specificially to allow
multiple entries (for instance, a wire is modified and then deleted).

This bus is almost certainly in 7.0 as well, but it comes up mostly
in schematics where 7.0 doesn't use COMMIT.  It's also possible that it
will cause unwanted effects in some cases, so I'm leaving it only in
master.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15032
This commit is contained in:
Jeff Young 2023-06-24 15:05:53 +01:00
parent bce643feae
commit 5195bc28fe
1 changed files with 0 additions and 8 deletions

View File

@ -151,14 +151,6 @@ void COMMIT::makeEntry( EDA_ITEM* aItem, CHANGE_TYPE aType, EDA_ITEM* aCopy, BAS
// Expect an item copy if it is going to be modified
wxASSERT( !!aCopy == ( ( aType & CHT_TYPE ) == CHT_MODIFY ) );
if( m_changedItems.find( aItem ) != m_changedItems.end() )
{
alg::delete_if( m_changes, [aItem, aScreen]( const COMMIT_LINE& aEnt )
{
return aEnt.m_item == aItem && aEnt.m_screen == aScreen;
} );
}
COMMIT_LINE ent;
ent.m_item = aItem;