System text from 2.3.2 imported as staff text (preventing to hide otherwise empty staff)
Reported version
3.0
Priority
P0 - Critical
Type
Functional
Severity
S3 - Major
Status
closed
Regression
Yes
Workaround
Yes
Project
- Open attached score (produced in 2.3.2).
See attached PNGs for expected (2.3.2) and actual results.
Using MuseScore 3.0 Nightly 9dac228 - Mac 10.11.6.
Comments
When clicking on system text, it says 'Stave Text: System Text;' - should it not just say 'System Text'?
Maybe this is the problem?
Fixed the title and changed the priority to Normal.
Some observations: When you open the file in 2.3.2 the System text is properly identified as system text, but identified as staff text in 3.0.
If the staff is visible because of the presence of staff text and you select a note on the electric piano and add system text, it attaches it to the first visible staff and that staff does not become invisible after deleting the staff text. Saving, closing and reopening the score fixes this. If the staff is not visible, system text has no effect on it.
In 2.x, system text was just staff text with a different style applied. In 3.0, it's truly a different element type. Since this score was created in 2.3.2, that's really staff text, and this triggers the new code to make staff text force staves visible. I think it probably should be converted to system text on import, but this isn't happening. Seems I recall this being discussed not long ago, but I don't recall where.
If it is not "by design", so it is a suggestion.
Well, it it were "Empty stave with Staff Text appears if hide empty staves enabled on imported score" it'd be a suggestion, but as is it is clearly a bug
Agreed. I was under the impression we were supposed to be automatically converting 2.x-style system text (staff text with system flag set and text style of System) into new 3.0-style system text (new element type). I see the code in read206, but it isn't working here for whatever reason. Looking...
Wow. The code in question depends on being able to seek ahead in the file while reading (to check "style" tag before deciding what kind of text create), and this depends on gory details of QIODevices and whatnot. Not what I was expecting at all :-) But anyhow, while a clever hack I'm sure, it fails before it even begins, there is no QIODevice associated with the stream, and my naive attempt to add one failed even more miserably.
OK, now that we understand the issue, and see that system text in 2.x is just not being imported correctly and this is just one side effect of that (another is that swing playback will now apply to top staff only - see #277698: Request ability to mute staff (as opposed to instrument, or voice) for how much hassle that can be to track down!), I'm changing the title and raising priority. Basically, system text in 2.x is just broken now. Maybe a different approach would allow us to solve this import issue?
came up again in #279830: 'hide empty staves' v2.3.2 vs v3.0.0
See https://github.com/musescore/MuseScore/pull/4381.
Fixed in branch master, commit 3a10013012
fix #276235: make it possible to enable readahead for XmlReader
Also actually use that possibility for correct importing of 2.X
system/staff text for both compressed and uncompressed files.
Fixed in branch master, commit 6d70cc9a9a
Merge pull request #4381 from dmitrio95/276235-2.X-system-staff-text-2
fix #276235: make it possible to enable readahead for XmlReader
Automatically closed -- issue fixed for 2 weeks with no activity.