Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change how clones are named #7550

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

regulus79
Copy link
Contributor

Description

Instead of naming cloned PatternTracks "Clone of ..." which can quickly build up with "Clone of Clone of Clone of Clone of Clone of ....", this PR changes clones to be named "... 2", and any tracks which have a number at the end to simply increment the number when naming the clone, like "... 3" and "... 4".

How it works

When you clone a track, the current name of the track is split by " ", and the last substring is checked to see if it can be converted to a number. If it can, then the name of the clone is set to the old name plus the number incremented, else it is set to the old name plus "2" at the end.

Notes:

I tried to use .arg() instead of string concatenation for inserting the name and number, but I was unsuccessful. I can try again to see if I can get it working if any of you would like.

Also, I'm guessing we don't need to translate it anymore? I still have tr("%1 2") there, but I can remove the tr it if you want.

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.

1 participant