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

REAPER reports 0 items removed when removing an item with Ripple Editing all tracks enabled #1019

Open
MarcoZehe opened this issue Mar 11, 2024 · 2 comments

Comments

@MarcoZehe
Copy link

Came across this yesterday while editing a two-track project.

  1. Navigate to a position in the project and press a to split and select item.
  2. Go to the end of the audio I want to remove and press a again.
  3. Make sure Ripple Edit is set to All Tracks.
  4. Press keys to navigate and select the item I want to remove.
  5. Press Delete.
    • Expected: Osara says 1 item removed.
    • Actual: Osara speaks 0 items removed.
      Doing the same in a single-track project works as expected.

OSARA 24.03.10, REAPER 7.11 under MacOS Sonoma 14.4. No changes to keymap.

@jcsteh
Copy link
Owner

jcsteh commented Mar 11, 2024

Urgh. I think this is similar to #423.

To report how many items were removed, OSARA saves the number of items before the action runs, then runs the action, then gets the number of items now, then subtracts the latter from the former. My guess is that because you're rippling all tracks, when you delete a whole item on one track, unless the items on all tracks line up precisely, REAPER has to split items on other tracks. So, even though you removed an item, there are now actually the same number of items: minus 1 for the removal, but plus 1 for the split.

I'm not quite sure how to fix this. We could look at the number of selected items before the removal instead and just assume they were all removed, but that's risky. We have no guarantee that REAPER actually removed only (or all of) those items, so we'd effectively be guessing, and I don't like guessing.

@jcsteh
Copy link
Owner

jcsteh commented Mar 11, 2024

I guess the assumption would be fine if we're certain those commands always operate on all selected items. However, I've just confirmed that item locking will prevent items from being deleted, so we'd have to handle that somehow.

Another possibility might be to store a list of items and call ValidatePtr on them all after we remove them, counting the items that fail to validate. That leaves the question: are there any of these item removal commands (bound to cmdRemoveItems or calling cmdhRemoveItems) which operate on anything other than selected items?

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

No branches or pull requests

2 participants