musescore/MuseScore — pull request #849 by MarcSabatella (2014-04-18 05:23:40+00:00)
Title: fix #24505: text in inspector

The UI and code for Text in the Inspector was present already; it just needed to be updated and enabled for other text types besides dynamics.

One potential side effect of this that we could choose to take advantage of or not. In order to implement the "Reset" button, I needed to add a Text::propertyDefault() method (overriding the generic Element version) to return the default text style for each text type. That is not a problem, but the Text::writeProperties() method was checking propertyDefault() to see if it needed to write a "style" tag or not. The generic Element::propertyDefault() was never returning any useful information, so the style tag was always written. Now that we have a Text::propertyDefault() method, "style" tags would be omitted for text elements that are using the default style for the text type. This seem too drastic a change just to get the Inspector working,, so I commented out the check in Text::writeProperties. That means we will continue to write "style" tags for all text elements. But it would be a simple matter to uncomment this line and thus get "optimized" writing of text elements, with "style" tags written only for elements using non-default styles.