Skip to content

Undo/Redo preserves clip IDs - #7880

Merged
saintmatthieu merged 1 commit into
audacity:masterfrom
saintmatthieu:7879-undo-redo-preserves-clip-IDs
Dec 11, 2024
Merged

saintmatthieu merged 1 commit into
audacity:masterfrom
saintmatthieu:7879-undo-redo-preserves-clip-IDs

Conversation

@saintmatthieu

@saintmatthieu saintmatthieu commented Dec 10, 2024 •

Copy link
Copy Markdown
Contributor

Resolves: #7358

  • I signed CLA
  • The title of the pull request describes an issue it addresses
  • If changes are extensive, then there is a sequence of easily reviewable commits
  • Each commit's message describes its purpose and effects
  • There are no behavior changes unnecessary for the stated purpose of the PR

Recommended:

  • Each commit compiles and runs on my machine without known undesirable changes of behavior

QA: Please verify if it's also fixed other undo/redo-related bugs, such as

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
auto pTrack = aTrack->Duplicate(options);
auto pTrack = aTrack->Duplicate(DuplicateOptions {}.Backup());

There is a bit nicer syntax for it

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I missed that, thanks.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we decided that forClipboard and backup are mutually exclusive, do we need to add another argument?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But I'm not sure that they are 😬 See

// If for the clipboard, then this is definitely not a backup action.
// MH: And if it isn't ?..

I guess this method could be called programmatically (hence not for the clipboard) but yet not for backup purpose. For this reason I prefer this uncertainty to be reflected here in case someone in the future this turns out to be a problem and someone debugs this.

@saintmatthieu
saintmatthieu force-pushed the 7879-undo-redo-preserves-clip-IDs branch from a4b2619 to dd87f7e Compare December 10, 2024 13:48
@saintmatthieu
saintmatthieu merged commit 78a6b07 into audacity:master Dec 11, 2024
@saintmatthieu
saintmatthieu deleted the 7879-undo-redo-preserves-clip-IDs branch August 28, 2026 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clip color changes when any action is undone/redone

2 participants