Fix #32261: Add zoom orientation for list type selections#33135
Fix #32261: Add zoom orientation for list type selections#33135shrutiba1 wants to merge 1 commit intomusescore:masterfrom
Conversation
Co-authored-by: Serenity Metzger <serenmet@umich.edu>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
mathesoncalum
left a comment
There was a problem hiding this comment.
Thanks for your contribution - looks good! I've left a comment with a requested change.
The only other thought I had was about efficiency since we're re-evaluating the centre point every time we call Cmd++ (even if the selection didn't change between calls). Ultimately I came to the conclusion that this isn't really a big deal as it would only be noticeable in absolutely enormous selections (in which case you're unlikely to be doing any zooming). Also any caching solution we implement is probably going to be more hassle than it's worth.
| resultY = result.y(); | ||
| } else { | ||
| // Selection: zoom at the center of the selection | ||
| PointF result = m_view->fromLogical(selection->canvasBoundingRect().center()); |
There was a problem hiding this comment.
I think NotationSelection::canvasBoundingRect would actually be the most coherent place for your newly added LIST logic. After a quick search it looks like findZoomFocusPoint is the only place we use this method (you may want to double check that), so I think we're safe to do so.
Resolves: #32261
The zoom orientation for list selections didn't have defined behavior, and was defaulting to the top left corner. Fixed by uniting positions of individual objects within a selection rather than treating them as a range.
We performed manual testing, as automatic testing would have required mouse/keyboard inputs that were difficult to automate. We've attached the video of our manual testing below:
Zoom.Orientation.Bug.Fix.mov