Skip to content

Commit

Permalink
Merge pull request #224 from lumxiv/fix-delete-track
Browse files Browse the repository at this point in the history
Fix iteration on tmtr while deleting elements
  • Loading branch information
0ceal0t authored Oct 19, 2024
2 parents bef0d8d + a8c842d commit c1a5d9a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions VFXEditor/Formats/TmbFormat/Track/Tmtr.cs
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,8 @@ public void DeleteEntry( List<ICommand> commands, TmbEntry entry ) {
}

public void DeleteAllEntries( List<ICommand> commands ) {
foreach( var entry in Entries ) {
commands.Add( new ListRemoveCommand<TmbEntry>( Entries, entry ) );
commands.Add( new ListRemoveCommand<TmbEntry>( File.AllEntries, entry ) );
for( int i = Entries.Count - 1; i >= 0; i-- ) {
commands.Add( new ListRemoveCommand<TmbEntry>( Entries, Entries.ElementAt( i ) ) );
}
}

Expand Down

0 comments on commit c1a5d9a

Please sign in to comment.