Repository navigation
Fix clip and label movement - #12097
Conversation
72d9721 to
dd72641
Compare
|
Important Review skippedWe couldn't safely recover the incremental review. No full review was started, and the last reviewed checkpoint was preserved. Retry later, or explicitly request a full review by commenting You can disable this status message by setting the Use the checkbox below for a quick retry:
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI (base), Organization UI (inherited) Review profile: CHILL Plan: Advanced Run ID: 📥 CommitsReviewing files that changed from the base of the PR and between 1ffbdef88c8a35fc586996e4fd6b06587b78c6b3 and 70511578e3adc2926a5561fae94a548b5e3b8007. 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe change adds a centralized controller for pointer and keyboard movement of clips, labels, and tracks. The QML timeline now uses controller-driven previews, drag ghosts, guidelines, and movement requests. Track-edit APIs now coordinate mixed-item moves with rollback and history updates. Realtime effect states are preserved during track replacement, duplication, and undo/redo. Tests cover movement, boundaries, previews, rollback, and effect preservation. Estimated code review effort: 5 (Critical) | ~120 minutes Merge Risk: 🟡 Moderate · up to The change improves clip and label dragging, but edge cases can still create misleading undo entries or corrupt movement offsets when tracks change during a move. Merge readiness is moderate pending fixes or explicit acceptance. 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
Warning Linked repositories: Public OSS repositories can only analyze public repositories installed in this organization. No linked repositories were analyzed; skipped Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI (base), Organization UI (inherited)
Review profile: CHILL
Plan: Advanced
Run ID: 0abcd0dc-6c13-4701-9f77-2339605949c1
📥 Commits
Reviewing files that changed from the base of the PR and between 7c66777 and 72d9721328f85ecc96eb95601ddb74eaa1618d6e.
📒 Files selected for processing (58)
au3/libraries/au3-realtime-effects/RealtimeEffectList.cppau3/libraries/au3-realtime-effects/RealtimeEffectList.hau3/libraries/au3-realtime-effects/RealtimeEffectState.cppau3/libraries/au3-realtime-effects/RealtimeEffectState.hau3/libraries/au3-track/CMakeLists.txtau3/libraries/au3-track/UndoTracks.cppsrc/effects/effects_base/internal/abstractviewlauncher.cppsrc/effects/effects_base/internal/realtimeeffectservice.cppsrc/project/tests/mocks/dummyeffectinstancefactory.hsrc/projectscene/CMakeLists.txtsrc/projectscene/internal/projectviewstate.cppsrc/projectscene/projectscenemodule.cppsrc/projectscene/qml/Audacity/ProjectScene/tracksitemsview/ClipItem.qmlsrc/projectscene/qml/Audacity/ProjectScene/tracksitemsview/LabelItem.qmlsrc/projectscene/qml/Audacity/ProjectScene/tracksitemsview/TrackClipsContainer.qmlsrc/projectscene/qml/Audacity/ProjectScene/tracksitemsview/TrackItemsContainer.qmlsrc/projectscene/qml/Audacity/ProjectScene/tracksitemsview/TrackLabelsContainer.qmlsrc/projectscene/qml/Audacity/ProjectScene/tracksitemsview/TracksItemsView.qmlsrc/projectscene/tests/CMakeLists.txtsrc/projectscene/tests/trackitemsmovecontroller_tests.cppsrc/projectscene/tests/tracklabelslayoutmanager_tests.cppsrc/projectscene/view/tracksitemsview/au3/samplespainterutils.cppsrc/projectscene/view/tracksitemsview/trackclipslistmodel.cppsrc/projectscene/view/tracksitemsview/trackclipslistmodel.hsrc/projectscene/view/tracksitemsview/trackitemslistmodel.cppsrc/projectscene/view/tracksitemsview/trackitemslistmodel.hsrc/projectscene/view/tracksitemsview/trackitemsmovecontroller.cppsrc/projectscene/view/tracksitemsview/trackitemsmovecontroller.hsrc/projectscene/view/tracksitemsview/tracklabelslayoutmanager.cppsrc/projectscene/view/tracksitemsview/tracklabelslistmodel.cppsrc/projectscene/view/tracksitemsview/tracklabelslistmodel.hsrc/projectscene/view/tracksitemsview/viewtrackitem.cppsrc/projectscene/view/tracksitemsview/viewtrackitem.hsrc/trackedit/iclipsinteraction.hsrc/trackedit/internal/au3/au3clipsinteraction.cppsrc/trackedit/internal/au3/au3clipsinteraction.hsrc/trackedit/internal/au3/au3interactiontypes.hsrc/trackedit/internal/au3/au3interactionutils.cppsrc/trackedit/internal/au3/au3interactionutils.hsrc/trackedit/internal/au3/au3labelsinteraction.cppsrc/trackedit/internal/au3/au3projecthistory.cppsrc/trackedit/internal/trackeditactionscontroller.cppsrc/trackedit/internal/trackeditactionscontroller.hsrc/trackedit/internal/trackeditinteraction.cppsrc/trackedit/internal/trackeditinteraction.hsrc/trackedit/internal/trackeditoperationcontroller.cppsrc/trackedit/internal/trackeditoperationcontroller.hsrc/trackedit/internal/tracksviewrequestsservice.cppsrc/trackedit/internal/tracksviewrequestsservice.hsrc/trackedit/itrackeditinteraction.hsrc/trackedit/itracksviewrequestsservice.hsrc/trackedit/tests/CMakeLists.txtsrc/trackedit/tests/au3clipsinteraction_tests.cppsrc/trackedit/tests/au3labelsinteractions_tests.cppsrc/trackedit/tests/mocks/clipsinteractionmock.hsrc/trackedit/tests/mocks/trackeditinteractionmock.hsrc/trackedit/tests/trackeditactionscontroller_tests.cppsrc/trackedit/tests/trackeditoperationcontroller_tests.cpp
💤 Files with no reviewable changes (3)
- src/trackedit/internal/au3/au3interactionutils.h
- src/trackedit/internal/trackeditactionscontroller.h
- src/trackedit/internal/au3/au3interactiontypes.h
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
6905702 to
1ffbdef
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI (base), Organization UI (inherited)
Review profile: CHILL
Plan: Advanced
Run ID: 81622892-ed4d-4898-9157-e8627a22c804
📥 Commits
Reviewing files that changed from the base of the PR and between 690570270b83e18a77fafb16cc80032b5d4e4283 and 1ffbdef88c8a35fc586996e4fd6b06587b78c6b3.
📒 Files selected for processing (7)
src/projectscene/qml/Audacity/ProjectScene/tracksitemsview/TracksItemsView.qmlsrc/projectscene/tests/trackitemsmovecontroller_tests.cppsrc/projectscene/view/tracksitemsview/trackitemsmovecontroller.cppsrc/trackedit/internal/au3/au3projecthistory.cppsrc/trackedit/internal/trackeditactionscontroller.cppsrc/trackedit/tests/CMakeLists.txtsrc/trackedit/tests/trackeditactionscontroller_tests.cpp
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
1ffbdef to
7051157
Compare
d92749e to
1a0e1a2
Compare
1a0e1a2 to
06bab7c
Compare
|
This is done, thank you! |
… tracks Previously when a clip was moved from one track to another, we were changing the actual track content on the fly. Due to technical specifics, in fact we were merging a temporary track with a single clip and the destination track - Move a clip from A to B: new temporary tracklist is created (with full effect stack) - In that copy remove the clip from A and insert into B - Replace affected tracks from the temporary tracklist to the project tracklist - Move the clip from B to C: the process repeats This made the visualisation easier - the view model always rendered the current project state. But was involving to many moving parts and changing the project data model. This PR changes the process to this: - Start dragging - the original clip is hidden, in its place we create a ghost clip - The ghost clip is not a real clip, it does not belong to the project and the QML item for its rendering refers to the original clip key - When dragging across tracks we move the ghost clip, but never change the project data - On drag finish we do the clip movement once as described above
After introducing ghost clips, the move happens in one moveClips call, and at that point selection still points to the previous project state
Now move item is called when the move is complete, intermediate state is handled by the move controller
…data change during the move
On move cancel move all items back and correctly restore selection
Label delegate could be destroyed when the label track moves out of viewport
Qt.callLater still calls the function even when the delegate is already gone, so replacing it with Timer
…and out size_t might be unsigned, we should check the value before converting to size_t, also adds missing return
Previously moving was updating the real project, and the view's horizontal scroll range was adjusted automatically during dragging Now that the project is not changed, we have to notify the view about ghost item position
06bab7c to
4b5372a
Compare
Fix clip and label movement (#12097)
Resolves: multiple item drag issues and crashes
Previously, when a clip moved from one track to another, we changed the track content on the fly.
This made the visualization easier - the view model always rendered the current project state.
But it involved too many moving parts and changing the project data model.
This PR changes the process to this:
Issues this PR fixes (only ones that I logged during testing)
Recommended:
QA: