Modify line text properties doesn't work

• May 29, 2014 - 10:05
Type
Functional
Severity
S4 - Minor
Status
closed
Project

Can not adjust the size of the "octave" or any other line. Changing it at "line properties" makes nothing. The solution was putting "8va" in the text window, but it is not very comfortable. Thank you!

MuseScoreNightly-2014-05-23-1350-6e452db
Windows 7


Comments

Hello,
Alternatively, instead of going through "line properties", go to Style ->Text -> Ottava, and change the size if desired. It will work for the entire score.☺
Ottava.jpg

Attachment Size
Ottava.jpg 79.69 KB

As another workaround that does allow you to have different lines with different text style, you can still use the Line Properties dialog, press the "..." to bring up the Text Properties dialog, and then instead of changing the size directly, instead select a different Style - perhaps a custom one you created yourself just for this purpose.

That's *almost* good enough that I'd propose getting rid of the ability to call Text Properties on the text, and instead add the Style dropdown - either there in Line Properties, in the Inspector, or both. In fact, having it available in the Inspector seems like a good idea to me no matter what. The TextLine section is currently empty; we should either remove it or add Style as we do for Text. I vote the latter.

But I'm guessing it is a simple fix to get the Text Properties dialog working here.

karolis, I'm unassigning you from this on the assumption you weren't really volunteering to fix it. If you were volunteering, now would be a good time :-), but by marking it unassigned, maybe someone else will text a look.

Getting change of style type to work in Inspector is not trivial because text lines do not have an actual "style" or "style type" property. These are managed separately for the begin, continue, and end elements. I could make it so changing the style type changed all three, but I guess I'll pass on that for now.

So I turned my attention tot he original bug - text properties not taking effect. The dialog sets the text properties for the individual begin, continue, and end elements, and as far as I can tell, gets it right. However, these are not laid out directly but instead copied to the textline segments that make up the textline, and I think it is during the copy that things are going awry. Right now, it seems only the text style type (eg, "Ottava") is being copied, not the actual text style. But I don't know how to do this correctly. I try copying the text style after the type, I try it the other way around, I try either beofre and after setting the actual text - it always seems the last one wins. So I can get it to honor the type setting made or the actual style data, but I can't get it to work like regular text where it takes the style type as a default then applies the changes to it.

This is TextLineSegment::layout1(), BTW, and/or TextLineSegment::setText() that is called from there.

I now wonder if the issue isn't further upstream after all - where text properties dialog results are first applied. I think the issue is that the following code that is applied after closing the normal text properties dialog:

https://github.com/musescore/MuseScore/blob/f9fb8bf7d604a4fd3d47dae1283…

is not duplicated when text properties is invoked from within the line properties dialog:

https://github.com/musescore/MuseScore/blob/f9fb8bf7d604a4fd3d47dae1283…

(and again for continue & end texts). This is where we would have detected if changes were made.

This area is a bit delicate so I'm not ready to go in and fix it myself right now, but if no one elseconvinces me otherwise or fixes it themselves, I may try to do so a bit later.

I think am becoming more rather than less confused. It seems that if I try to up the size using text properties, nothing happens, but if I save and reload the score, the text is gone completely. That is:

1) new score
2) add ottava
3) right click, line properties
4) "..." for the Begin text ("8")
5) change size to 20
6) OK, OK

Result: no change in size of the "8"

7) save
8) reload

Result: the "8" is gone completely

So I think the problems are deeper than I was thinking.

Status (old) fixed active

This fixes the ability to change properties directly, but breaks the ability to change the style type. Eg, instead of increasing size, try changing the style to "rehearsal mark". That what I was going on about in response #5. And also, "end" text is not fixed by this change (although it would be with a similar changes a few lines later).

Also, #7 is still broken. Changing text style content (eg, size) now appears to work, but upon save, reload, the text is gone.

On changing the style in Text PRoperties a "Reset to Style" is now done so the values change as expected.
The vanishing text bug is fixed.
What about the "end" text ? I don't see any problem.

The problem with End text is that if you do have End text, the text properties dialog next to it doesn't actually work. I mean, the dialog comes up, but changes do not take effect in the score, at least not until you reload. That's because in layout1(), endText doesn't call TextLineSegment::setText but instead just the generic Text::setText(). When I was fiddling with this, I added a setTextStyle call to where the end text is handled, but ti didn't work because there was no reset to style.

BTW, I am very glad to see the automatic reset to style, not just for this, but for all text. I had been finding the behavior of the text properties dialog confusing; now it makes much more sense.