musescore / musescore/MuseScore
(Plugin API) SLUR_SEGMENT.pagePos returns position of system, rather than slur
Open
@igorkorsukov is already working on this.
Since Apr 1, 2025.
community
needs review
plugins
- Dominant language
- C++
- Stars
- 15.1k
- Forks
- 3.3k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 91
Description
Issue type
Other type of issue
Description with steps to reproduce
- In a score with slurs in it, a plugin parses curScore.selection until it finds an element of type Element.SLUR_SEGMENT
- For each SLUR_SEGMENT, it gets the pagePos property of that element to see where it is located on the page
- Expected result: the page location of the element
- Actual result: the page location of the system it's attached to, rather than the location of the slur
Supporting files, videos and screenshots
This screenshot shows the text output of the following line of code:
logError ("Found a slur: pagePos = {"+Math.round(currentSlur.pagePos.x*100)/100.+","+Math.round(currentSlur.pagePos.y*100)/100.+"}\nParent system pagePos = {"+Math.round(currentSlur.parent.pagePos.x*100)/100.+","+Math.round(currentSlur.parent.pagePos.y*100)/100.+"}");
What is the latest version of MuseScore Studio where this issue is present?
4.5.1
Regression
I was unable to check
Operating system
macOS 15.3.2
Additional context
No response
Checklist
- This report follows the guidelines for reporting bugs and issues
- I have verified that this issue has not been logged before, by searching the issue tracker for similar issues
- I have attached all requested files and information to this report
- I have attempted to identify the root problem as concisely as possible, and have used minimal reproducible examples where possible
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.