Repository navigation
Fix label creation position - #11872
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ 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 4ca26aed68a0a8d23d30c0dfa0459eb354387bde and 883f90e. 📒 Files selected for processing (2)
📝 WalkthroughWalkthrough
Estimated code review effort: 2 (Simple) | ~10 minutes Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to Point labels created from an empty selection now appear at the playback position, while range labels retain their selected bounds. The behavior is covered by an updated focused test, with no remaining merge-blocking risk identified. 🚥 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 Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| selectionController()->dataSelectedEndTime()); | ||
| const double selectionStart = selectionController()->dataSelectedStartTime(); | ||
| const double selectionEnd = selectionController()->dataSelectedEndTime(); | ||
| if (selectionEnd > selectionStart) { |
There was a problem hiding this comment.
please use RealIsEqualOrLess for "double" comparisons
if (!muse::RealIsEqualOrLess(selectionEnd, selectionStart)
or (I prefer this)
selectionController()->timeSelectionIsEmpty() where we already use RealIsEqualOrLess
There was a problem hiding this comment.
In the end I had to use muse::RealIsEqualOrLess(selectionEnd, selectionStart) as dataSelectedStartTime() returns a different value (m_selectedStartTime.changed) wrt what is used in timeSelectionIsEmpty (m_selectedStartTime.val)
205a729 to
89c5a35
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
89c5a35 to
928a222
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
928a222 to
4ca26ae
Compare
4ca26ae to
883f90e
Compare
|
@RiccardoCampo thanks for the contribution! merged |
Fix label creation position (#11872)
Resolves: #11682
When the track selection is a point, create a label at the playback position. Before this change, the label was created at the selection position, which may be ambiguous since you cannot see the point selection.
Recommended:
QA: