Repository navigation
Bug2464 - #673
Merged
Merged
Bug2464#673
Conversation
one taking candidate list directly, the others delegating to it. Some members removed, some in-class initializers. The special constructor for TimeShift only has extra arguments. It will go away.
... in TimeShiftHandle. They do nothing useful yet, but responsibilities will shift into them. TypeSwitch is avoided and the subclasses are defined in appropriate places for dependency management, thanks to AttachedVirtualFunction.
... Preserving existing behavior, but maybe these cases should be reconsidered and made more uniform. (e.g. should hit test on NoteTrack sometimes miss, as with WaveTrack?) Also made details of WaveTrack hit testing consistent with what ClipMenus does
... for now redundantly with the older logic. Also shorten a function name to Init
... Also dependency of TimeShiftHandle on LabelTrack, lately added, is removed
... There is an AttachedVirtualFunction which is a factory for TrackShifter, and subclasses of it appropriate for different kinds of tracks. The logic to choose the intervals of tracks that move is replicated in them. The old logic is not yet removed. Enough logic is moved into them, so that snapping in TimeShift, and DoClipMove in ClipMenus.cpp, make no direct special use of classes WaveTrack and WaveClip. Not yet defining a new subclass for shifting of labels -- that will be the last step.
... than the one clicked in; and the clip can't fit into the new track, but it can still slide horizontally within its track. This eliminates a redundant use of WaveClip::Offset().
... And don't move from the shared pointer argument
... for shifting of clips among tracks But this (temporarily) breaks the behavior of dragging back to the original clip without first releasing the mouse
... Also the clips to shift within a WaveTrack are tested all at once, more simply
... Because LabelTrack, unlike the others, will also need a mouse y coordinate. The extra information is present when using the time-shift tool but not when using the items in ClipMenus.
... Implemented non-invasively just with overrides in LabelTrackShifter Exceeding the bug description: it's also possible to drag just the subset of labels that fall partly or wholly in the selected region. I expect details of the new behavior may be debated.
Contributor
|
Thanks. This is mostly seen/reviewed before. The additional code looks fine, and works fine in preliminary testing. I'm a little wary of the additional repetition of 'OnLabelPermuted' code, but it's OK. I think there's some future work to do on redefining what 'HitTest' really is, since it is becoming more general, and we're seeing a new type switch that follows on from it. Overall though, delighted to have this bug fixed, with care taken over details such as quantization of position and dragging to other tracks. If it has also made the code cleaner and easier to work with, that's a good outcome too. Thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug 2464 fix