Pedal start hook always present, even when adding the "Ped" symbol without start hook
Ubuntu Studio 14.04, GIT commit: 9133473
1) new score or my first score
2) drag first pedal marking from palette to score - the one with "Ped" but no start hook
Result: start hook appears in score
Even if you then go to line properties and unset the start hook, the hook reappears on save/reload. Or, if you copy & paste the measure containing the start-hook-less pedal marking, the hook appears in the copy.
It seems the marking is written to the file/clipboard correctly with respect to the actual beginHook property - "false" is the default, nothing is written, and that's fine. However, the fact that the hook *height* is written even though the hook is turned off means that on read(), we automatically turn on the hook. That's the cause of the problem here.
The obvious thing to try here is not automatically setting beginhook to true just because there is a beginHookHeight tag. I would not be at all surprised if this didn't break compatibility with something else though. I know there have been lots of related bugs in this area of code.
Comments
BTW, the same issue exists for end hooks. You can reproduce it as follows:
1) new score / my first score
2) add plain line with no hook to score
3) line properties
4) change end hook height, but don't actually check the box to enable the hook
5) either save/reload or copy/paste the measure containing the line
Result: the line now has has a hook, because setting the height property to a non-default value forced the _endHook flag to be enabled on read.
I propose *not* setting _beginHook or _endHook when a Height flag is encountered, except for 1.3 scores (since they do not normally or perhaps ever write beginHook or endHook tags - only height tags ).
PR implementing my proposed fix as part of a fix for another bug involving textlines (I needed to fix this one too to get the vtest working):
https://github.com/musescore/MuseScore/pull/1349
The PR has been merged.
Automatically closed -- issue fixed for 2 weeks with no activity.