musescore / musescore/MuseScore

(Plugin API) SLUR_SEGMENT.pagePos returns position of system, rather than slur

Open
#27,461 2 comments 0 reactions 1 assignee View on GitHub

@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
  1. In a score with slurs in it, a plugin parses curScore.selection until it finds an element of type Element.SLUR_SEGMENT
  2. For each SLUR_SEGMENT, it gets the pagePos property of that element to see where it is located on the page
  3. Expected result: the page location of the element
  4. 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.+"}");

Image
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.