Pedal start hook always present, even when adding the "Ped" symbol without start hook

• Oct 3, 2014 - 19:01
Type
Functional
Severity
S4 - Minor
Status
closed
Project

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 ).