Allow PianoRoll to access ClipView of current clip
- Dominant language
- C++
- Stars
- 10.4k
- Forks
- 1.3k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 7
Description
Currently, the `PianoRoll` only has access to the `Clip` object of the midi clip currently being edited, not the `ClipView`. This is fine for the most part, but it means that certain things about the clip which are stored in the `ClipView` cannot be edited.
In particular, once #7477 gets merged, it would be nice to have a way to toggle auto-resizing of the current clip in the piano roll, since it could get a bit confusing for some users who resize a clip, then try to edit it and see that it doesn't automatically resize.
In order to do this, we could either:
1. Store a pointer to the `ClipView` along with the pointer to the `Clip` in the PianoRoll
2. Only store a pointer to the `ClipView`, and use `ClipView::getClip` to access the clip.
3. Add a method to `Clip` to get which `ClipView` corresponds to it. You can already to the opposite, get the `Clip` via `ClipView::getClip()`, but not the other way around.
4. Store pointers to each clip/clipview in a big list somewhere?
All of these options have drawbacks, either by breaking the desired core/gui separation, or introducing potential sync issues. I would love to hear your opinions on it.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing how PianoRoll currently accesses the current Clip and how ClipView::getClip provides the reverse lookup. Consider the four ownership and lookup options in the issue, including core/GUI separation and synchronization, then define a decision that enables the current clip's auto-resizing control after #7477 without introducing stale pointers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- desktop
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100