Stave Text imported in 1.3 score imported from MusicXML appears at top instrument

• Aug 24, 2014 - 16:45
S4 - Minor

1. Open attached mscz (produced in 1.3).
2. 'File'>'Export…'.
3. Choose 'MusicXML'.
4. 'Save'.
5. Open MusicXML.

Expected result:
Stave Text appears at top instrument (Expected result).png

Actual result:
Stave Text appears at top instrument (Actual result).png

Note: I also attached the produced MusicXML.

Using MuseScore 2.0 Nightly Build (1c07b89) - Mac 10.7.5.


I have encountered another instance of "Stave Text appears at top instrument". However, it is not directly associated with MusicXML import. I thought I should post it as a comment here rather than initiate a new issue since I am not familiar with how things are typically done in MuseScore development.

If the attached .mscz file is opened with 1.3, the text "legato" is properly positioned in measure 22 for each of the voice staves. If the same file is opened with 2.0. The words all appear above the top staff although the correct horizontal position is preserved.

The problem does not appear to be that the association between the text and the staff is lost. This can be demonstrated by dragging the "legato" texts in measure 22 so they are not on top of each other and doing the same with the "sfz p" texts in measure 25. If you then menu-click on one instance of "legato" and choose "Select: All Similar Elements in Same Staff" only one of the "sfz p" texts becomes selected.

As background, the .mscz file was created by importing an .xml file into 1.3 and doing some adjustments of general properties. I can provide the source .xml file if it would be useful.

Attachment Size
Elija Rock P2SSAATTBB.mscz 42.71 KB

I think the problem is that the staff texts were imported as "Text" type, both in 1.3 and 2.0. Indeed, the track was set correctly in the xml import for most cases (there was only a little bug in the case in which each instrument was inside a separate part), but the text was rendered in the wrong place due to being a "Text" element instead of a "StaffText" element. I think it is a problem in rendering of "Text" element.
I corrected this in MusicXML import in the PR by changing the type from "Text" to "StaffText", which is the type used when creating the example from scratch inside MuseScore (just look in the Debugger).
I didn't think about previously imported MusicXML files from MuseScore 1.3. But I actually don't know what to modify to render "Text" elements in the correct position, and, most importantly, I don't know if changing this could affect the current rendering of text elements (since they are all children of the "Text" class).

The PR was merged. Starting from a MusicXML file this problem should be solved.
The case in which the MusicXML was imported in 1.3 (StaffTexts imported as Texts) and then saved to mscz is actually still open.

Title [MusicXML] Stave Text appears at top instrument Stave Text imported in 1.3 score imported from MusicXML appears at top instrument

Hopefully an accurate title for the remaining aspect of this issue? Or someone could file a new one

I opened the Elija Rock P2SSAATTBB.mscz file using the Nightly Build e4004d6. The staff text was correctly placed. Therefore, a new bug report is not needed.