Spacing for center-aligned chords not honored until second layout

• Sep 25, 2019 - 10:55
Reported version
3.2
Priority
P1 - High
Type
Functional
Frequency
Few
Severity
S3 - Major
Reproducibility
Always
Status
closed
Regression
No
Workaround
Yes
Project

MS 3.2.3.

  1. Open the attached score.
  2. Select the second chord symbol and change the Horizontal align to Center (for example).
  3. Now perform another action in the score.
    Result: There is an unexpected system re-layout. But this should have occured automatically after step 2.
Attachment Size
chord_symbol_alignment.mscz 5.37 KB

Comments

Title Chord symbols: system does not re-layout automatically after change of horizontal alignment Chord symbols: score does not re-layout automatically after change of horizontal alignment
Workaround No Yes

Deleted.

Title Chord symbols: score does not re-layout automatically after change of horizontal alignment Score does not re-layout after operations involving Chord Symbols

The score does not re-layout either if chord symbols are copied:

  1. Open attached score.
  2. Select all the chord symbols in the first system and copy them.
  3. Click on the first note in the second system and paste.
    Result: The chord symbols are pasted as expected but overlap the barlines. The user has to force a re-layout of the system to correct it.
Attachment Size
chord_symbol_alignment_2.mscz 8.21 KB
Title Score does not re-layout after operations involving Chord Symbols Score does not re-layout after operations involving chord symbols; layout lost on save and reload
Severity S3 - Major S2 - Critical
Workaround Yes No

OS: Windows 10 (10.0), Arch.: x86_64, MuseScore version (64-bit): 3.3.0.8605, revision: c94866a

IMV, critical because layout changes are lost when you save and reopen the score.

  1. Open the attached file. The chord symbols have been set to center-align.
  2. Select any note; transpose up a tone then back to re-layout the score.
  3. Save and reload the score.

Result: The corrected layout is lost.

Attachment Size
chord_symbol_center_align.mscz 7.58 KB
Severity S2 - Critical S3 - Major
Priority P1 - High

I can confirm these layout glitches. But to be clear: no information is lost, it's just a layout glitch where something that doesn't appear entirely correct at first. All information is present, it just takes an extra layout before it takes effect.

Title Score does not re-layout after operations involving chord symbols; layout lost on save and reload Spacing for center-aligned chords not honored until second layout

The issue is that the partial layout done in layout1() does not account for alignment, nor is accounted for in ChorRest::shape() where we figure the spacing. So only after the first full layout do we get a good bbox. The trick will be fixing that without breaking something else involving chord symbol spacing / layout.

Title Spacing for center-aligned chords not honored until second layout Spacing for center-aligned chords not honored until second layout (and the workaround is not straightforward)
Workaround No Yes

There appears to be a workaround which re-lays out the whole score at once: Go to Style > Chord symbols, change "Maximum barline distance", then return it to the starting value. The changes, however, are lost when the score is closed.

Title Spacing for center-aligned chords not honored until second layout (and the workaround is not straightforward) Spacing for center-aligned chords not honored until second layout

Yes, I seem to encountering this.

I had been scratching my head after publishing/saving a score, convinced that I had made manual adjustments.

A fix would be ideal ASAP (in my opinion), as it represents a false premise for the score.

Status PR created fixed

Fixed in branch master, commit 9946fb7c42

_Fix #293785: Fix #302590: Fix #294890 Chord symbols jump when user goes into edit mode

This commit resolves two issues:
Fix #302590 - Inconsistent alignment of chord name above fretboard
Fix #293785 - Chord symbols jump when user goes into edit mode
Fix #294890 - Spacing for center-aligned chords not honored until second layout

When looking into #293785 it was found that placement of Harmonies above a FretDiagram
was not consistent.
o) Align::HCENTER aligns the horizontal centers of bot Harmony and FretDiagram.
o) Align::RIGHT aligns the right edge of the Harmony roughly to the centrer of the FretDiagram.
o) Align::LEFT aligns the left edge of the Harmony to the left edge of the FretDiagram.

So every alignment uses it own reference. This has been corrected first.

The root cause of #302590 was the difference of bounding box between NORMAL and EDIT mode.
And this was caused because of the different formating between NORMAL and EDIT. In EDIT mode
the horizontal alignment was using both different algorithm and reference. Also the height
of the bounding box where different in EDIT and NORMAL mode
To solve this the bounding box while in EDIT mode
1) is aligned exactly are in NORMAL mode
2) has the same height in both EDIT and NORMAL mode._

Fixed in branch master, commit 9946fb7c42

_Fix #293785: Fix #302590: Fix #294890 Chord symbols jump when user goes into edit mode

This commit resolves two issues:
Fix #302590 - Inconsistent alignment of chord name above fretboard
Fix #293785 - Chord symbols jump when user goes into edit mode
Fix #294890 - Spacing for center-aligned chords not honored until second layout

When looking into #293785 it was found that placement of Harmonies above a FretDiagram
was not consistent.
o) Align::HCENTER aligns the horizontal centers of bot Harmony and FretDiagram.
o) Align::RIGHT aligns the right edge of the Harmony roughly to the centrer of the FretDiagram.
o) Align::LEFT aligns the left edge of the Harmony to the left edge of the FretDiagram.

So every alignment uses it own reference. This has been corrected first.

The root cause of #302590 was the difference of bounding box between NORMAL and EDIT mode.
And this was caused because of the different formating between NORMAL and EDIT. In EDIT mode
the horizontal alignment was using both different algorithm and reference. Also the height
of the bounding box where different in EDIT and NORMAL mode
To solve this the bounding box while in EDIT mode
1) is aligned exactly are in NORMAL mode
2) has the same height in both EDIT and NORMAL mode._

Fix version
3.5.0