Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MU3 Backend] Eng-53: Horizontal spacer for FretDiagrams #8296

Merged

Conversation

iveshenry18
Copy link
Contributor

Resolves: ENG-53: Fretboard diagrams need to create horizontal space

This adds a case for including fretboard diagrams when
creating horizontal spacing in the ChordRest::shape() function. In
pursuit of this, it also extracts a calculateBoundingRect() function from
FretDiagram::layout().

NOTE: In order to allow "orphaned" FretDiagrams to still create space,
the spacer is added to all staves. This is redundant in some cases, so
a more performant solution may be desirable in the future.

This PR also includes the commit from #8176, as this is built on top of it.

  • I signed CLA
  • I made sure the code in the PR follows the coding rules
  • I made sure the code compiles on my machine
  • I made sure there are no unnecessary changes in the code
  • I made sure the title of the PR reflects the core meaning of the issue you are solving
  • I made sure the commit message(s) contain a description and answer the question "Why do those changes fix that particular issue?" or "Why are those changes really necessary as improvements?"
  • I made sure the commit message title starts with "fix #424242:" if there is a related issue
  • I created the test (mtest, vtest, script test) to verify the changes I made

Previously, melismas were treated the same as normal Lyrics in terms of
horizontal spacing—they would cause a spacer to be added to the
ChordRest to which they were attached, causing an unnecessary gap after
the first note of a melisma.

This commit prevents a melisma from adding a right spacer to
their first ChordRest, and rather creates a right
spacer on the last ChordRest of a lyric if necessary.

In pursuit of this, this commit refactors ChordRest::_melismaEnd(s) from
a bool to a std::set<*Lyrics>, giving a ChordRest a way to access the
melismatic Lyrics that end on it. This change also solves the problem of
said bool being untrustworthy (i.e. erroneously being changged to false
when one of multiple melismas was removed).
This commit adds a case for including fretboard diagrams when
creating horizontal spacing in the ChordRest::shape() function. In
pursuit of this, it also extracts a calculateBoundingRect function from
FretDiagram::layout().

NOTE: In order to allow "orphaned" FretDiagrams to still create space,
the spacer is added to all staves. This is redundant in some cases, so
a more performant solution may be desirable in the future.
@vpereverzev vpereverzev merged commit 3476c0f into musescore:3.6.2_backend Jun 15, 2021
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Jun 28, 2021
Previously, melismas were treated the same as normal Lyrics in terms of
horizontal spacing—they would cause a spacer to be added to the
ChordRest to which they were attached, causing an unnecessary gap after
the first note of a melisma.

This commit prevents a melisma from adding a right spacer to
their first ChordRest, and rather creates a right
spacer on the last ChordRest of a lyric if necessary.

In pursuit of this, this commit refactors ChordRest::_melismaEnd(s) from
a bool to a std::set<*Lyrics>, giving a ChordRest a way to access the
melismatic Lyrics that end on it. This change also solves the problem of
said bool being untrustworthy (i.e. erroneously being changged to false
when one of multiple melismas was removed).

Duplicate pf musescore#8296
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Jun 28, 2021
This commit adds a case for including fretboard diagrams when
creating horizontal spacing in the ChordRest::shape() function. In
pursuit of this, it also extracts a calculateBoundingRect function from
FretDiagram::layout().

NOTE: In order to allow "orphaned" FretDiagrams to still create space,
the spacer is added to all staves. This is redundant in some cases, so
a more performant solution may be desirable in the future.

Duplicate of musescore#8296
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Jun 28, 2021
Previously, melismas were treated the same as normal Lyrics in terms of
horizontal spacing—they would cause a spacer to be added to the
ChordRest to which they were attached, causing an unnecessary gap after
the first note of a melisma.

This commit prevents a melisma from adding a right spacer to
their first ChordRest, and rather creates a right
spacer on the last ChordRest of a lyric if necessary.

In pursuit of this, this commit refactors ChordRest::_melismaEnd(s) from
a bool to a std::set<*Lyrics>, giving a ChordRest a way to access the
melismatic Lyrics that end on it. This change also solves the problem of
said bool being untrustworthy (i.e. erroneously being changged to false
when one of multiple melismas was removed).

Duplicate pf musescore#8296
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Jun 28, 2021
This commit adds a case for including fretboard diagrams when
creating horizontal spacing in the ChordRest::shape() function. In
pursuit of this, it also extracts a calculateBoundingRect function from
FretDiagram::layout().

NOTE: In order to allow "orphaned" FretDiagrams to still create space,
the spacer is added to all staves. This is redundant in some cases, so
a more performant solution may be desirable in the future.

Duplicate of musescore#8296
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Jun 28, 2021
Previously, melismas were treated the same as normal Lyrics in terms of
horizontal spacing—they would cause a spacer to be added to the
ChordRest to which they were attached, causing an unnecessary gap after
the first note of a melisma.

This commit prevents a melisma from adding a right spacer to
their first ChordRest, and rather creates a right
spacer on the last ChordRest of a lyric if necessary.

In pursuit of this, this commit refactors ChordRest::_melismaEnd(s) from
a bool to a std::set<*Lyrics>, giving a ChordRest a way to access the
melismatic Lyrics that end on it. This change also solves the problem of
said bool being untrustworthy (i.e. erroneously being changged to false
when one of multiple melismas was removed).

Duplicate pf musescore#8296
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Jun 28, 2021
This commit adds a case for including fretboard diagrams when
creating horizontal spacing in the ChordRest::shape() function. In
pursuit of this, it also extracts a calculateBoundingRect function from
FretDiagram::layout().

NOTE: In order to allow "orphaned" FretDiagrams to still create space,
the spacer is added to all staves. This is redundant in some cases, so
a more performant solution may be desirable in the future.

Duplicate of musescore#8296
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Jul 1, 2021
Previously, melismas were treated the same as normal Lyrics in terms of
horizontal spacing—they would cause a spacer to be added to the
ChordRest to which they were attached, causing an unnecessary gap after
the first note of a melisma.

This commit prevents a melisma from adding a right spacer to
their first ChordRest, and rather creates a right
spacer on the last ChordRest of a lyric if necessary.

In pursuit of this, this commit refactors ChordRest::_melismaEnd(s) from
a bool to a std::set<*Lyrics>, giving a ChordRest a way to access the
melismatic Lyrics that end on it. This change also solves the problem of
said bool being untrustworthy (i.e. erroneously being changged to false
when one of multiple melismas was removed).

Duplicate pf musescore#8296
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Jul 1, 2021
This commit adds a case for including fretboard diagrams when
creating horizontal spacing in the ChordRest::shape() function. In
pursuit of this, it also extracts a calculateBoundingRect function from
FretDiagram::layout().

NOTE: In order to allow "orphaned" FretDiagrams to still create space,
the spacer is added to all staves. This is redundant in some cases, so
a more performant solution may be desirable in the future.

Duplicate of musescore#8296
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Jul 6, 2021
Previously, melismas were treated the same as normal Lyrics in terms of
horizontal spacing—they would cause a spacer to be added to the
ChordRest to which they were attached, causing an unnecessary gap after
the first note of a melisma.

This commit prevents a melisma from adding a right spacer to
their first ChordRest, and rather creates a right
spacer on the last ChordRest of a lyric if necessary.

In pursuit of this, this commit refactors ChordRest::_melismaEnd(s) from
a bool to a std::set<*Lyrics>, giving a ChordRest a way to access the
melismatic Lyrics that end on it. This change also solves the problem of
said bool being untrustworthy (i.e. erroneously being changged to false
when one of multiple melismas was removed).

Duplicate of musescore#8296
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Jul 6, 2021
This commit adds a case for including fretboard diagrams when
creating horizontal spacing in the ChordRest::shape() function. In
pursuit of this, it also extracts a calculateBoundingRect function from
FretDiagram::layout().

NOTE: In order to allow "orphaned" FretDiagrams to still create space,
the spacer is added to all staves. This is redundant in some cases, so
a more performant solution may be desirable in the future.

Duplicate of musescore#8296
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Jul 27, 2021
Previously, melismas were treated the same as normal Lyrics in terms of
horizontal spacing—they would cause a spacer to be added to the
ChordRest to which they were attached, causing an unnecessary gap after
the first note of a melisma.

This commit prevents a melisma from adding a right spacer to
their first ChordRest, and rather creates a right
spacer on the last ChordRest of a lyric if necessary.

In pursuit of this, this commit refactors ChordRest::_melismaEnd(s) from
a bool to a std::set<*Lyrics>, giving a ChordRest a way to access the
melismatic Lyrics that end on it. This change also solves the problem of
said bool being untrustworthy (i.e. erroneously being changged to false
when one of multiple melismas was removed).

Duplicate of musescore#8296
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Jul 27, 2021
This commit adds a case for including fretboard diagrams when
creating horizontal spacing in the ChordRest::shape() function. In
pursuit of this, it also extracts a calculateBoundingRect function from
FretDiagram::layout().

NOTE: In order to allow "orphaned" FretDiagrams to still create space,
the spacer is added to all staves. This is redundant in some cases, so
a more performant solution may be desirable in the future.

Duplicate of musescore#8296
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Jul 27, 2021
Previously, melismas were treated the same as normal Lyrics in terms of
horizontal spacing—they would cause a spacer to be added to the
ChordRest to which they were attached, causing an unnecessary gap after
the first note of a melisma.

This commit prevents a melisma from adding a right spacer to
their first ChordRest, and rather creates a right
spacer on the last ChordRest of a lyric if necessary.

In pursuit of this, this commit refactors ChordRest::_melismaEnd(s) from
a bool to a std::set<*Lyrics>, giving a ChordRest a way to access the
melismatic Lyrics that end on it. This change also solves the problem of
said bool being untrustworthy (i.e. erroneously being changged to false
when one of multiple melismas was removed).

Duplicate of musescore#8296
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Jul 27, 2021
This commit adds a case for including fretboard diagrams when
creating horizontal spacing in the ChordRest::shape() function. In
pursuit of this, it also extracts a calculateBoundingRect function from
FretDiagram::layout().

NOTE: In order to allow "orphaned" FretDiagrams to still create space,
the spacer is added to all staves. This is redundant in some cases, so
a more performant solution may be desirable in the future.

Duplicate of musescore#8296
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Jul 27, 2021
Previously, melismas were treated the same as normal Lyrics in terms of
horizontal spacing—they would cause a spacer to be added to the
ChordRest to which they were attached, causing an unnecessary gap after
the first note of a melisma.

This commit prevents a melisma from adding a right spacer to
their first ChordRest, and rather creates a right
spacer on the last ChordRest of a lyric if necessary.

In pursuit of this, this commit refactors ChordRest::_melismaEnd(s) from
a bool to a std::set<*Lyrics>, giving a ChordRest a way to access the
melismatic Lyrics that end on it. This change also solves the problem of
said bool being untrustworthy (i.e. erroneously being changged to false
when one of multiple melismas was removed).

Duplicate of musescore#8296
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Jul 27, 2021
This commit adds a case for including fretboard diagrams when
creating horizontal spacing in the ChordRest::shape() function. In
pursuit of this, it also extracts a calculateBoundingRect function from
FretDiagram::layout().

NOTE: In order to allow "orphaned" FretDiagrams to still create space,
the spacer is added to all staves. This is redundant in some cases, so
a more performant solution may be desirable in the future.

Duplicate of musescore#8296
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Jul 27, 2021
Previously, melismas were treated the same as normal Lyrics in terms of
horizontal spacing—they would cause a spacer to be added to the
ChordRest to which they were attached, causing an unnecessary gap after
the first note of a melisma.

This commit prevents a melisma from adding a right spacer to
their first ChordRest, and rather creates a right
spacer on the last ChordRest of a lyric if necessary.

In pursuit of this, this commit refactors ChordRest::_melismaEnd(s) from
a bool to a std::set<*Lyrics>, giving a ChordRest a way to access the
melismatic Lyrics that end on it. This change also solves the problem of
said bool being untrustworthy (i.e. erroneously being changged to false
when one of multiple melismas was removed).

Duplicate of musescore#8296
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Jul 27, 2021
This commit adds a case for including fretboard diagrams when
creating horizontal spacing in the ChordRest::shape() function. In
pursuit of this, it also extracts a calculateBoundingRect function from
FretDiagram::layout().

NOTE: In order to allow "orphaned" FretDiagrams to still create space,
the spacer is added to all staves. This is redundant in some cases, so
a more performant solution may be desirable in the future.

Duplicate of musescore#8296
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Jul 28, 2021
Previously, melismas were treated the same as normal Lyrics in terms of
horizontal spacing—they would cause a spacer to be added to the
ChordRest to which they were attached, causing an unnecessary gap after
the first note of a melisma.

This commit prevents a melisma from adding a right spacer to
their first ChordRest, and rather creates a right
spacer on the last ChordRest of a lyric if necessary.

In pursuit of this, this commit refactors ChordRest::_melismaEnd(s) from
a bool to a std::set<*Lyrics>, giving a ChordRest a way to access the
melismatic Lyrics that end on it. This change also solves the problem of
said bool being untrustworthy (i.e. erroneously being changged to false
when one of multiple melismas was removed).

Duplicate of musescore#8296
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Jul 28, 2021
This commit adds a case for including fretboard diagrams when
creating horizontal spacing in the ChordRest::shape() function. In
pursuit of this, it also extracts a calculateBoundingRect function from
FretDiagram::layout().

NOTE: In order to allow "orphaned" FretDiagrams to still create space,
the spacer is added to all staves. This is redundant in some cases, so
a more performant solution may be desirable in the future.

Duplicate of musescore#8296
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Jul 28, 2021
Previously, melismas were treated the same as normal Lyrics in terms of
horizontal spacing—they would cause a spacer to be added to the
ChordRest to which they were attached, causing an unnecessary gap after
the first note of a melisma.

This commit prevents a melisma from adding a right spacer to
their first ChordRest, and rather creates a right
spacer on the last ChordRest of a lyric if necessary.

In pursuit of this, this commit refactors ChordRest::_melismaEnd(s) from
a bool to a std::set<*Lyrics>, giving a ChordRest a way to access the
melismatic Lyrics that end on it. This change also solves the problem of
said bool being untrustworthy (i.e. erroneously being changged to false
when one of multiple melismas was removed).

Duplicate of musescore#8296
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Jul 28, 2021
This commit adds a case for including fretboard diagrams when
creating horizontal spacing in the ChordRest::shape() function. In
pursuit of this, it also extracts a calculateBoundingRect function from
FretDiagram::layout().

NOTE: In order to allow "orphaned" FretDiagrams to still create space,
the spacer is added to all staves. This is redundant in some cases, so
a more performant solution may be desirable in the future.

Duplicate of musescore#8296
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Aug 13, 2021
Previously, melismas were treated the same as normal Lyrics in terms of
horizontal spacing—they would cause a spacer to be added to the
ChordRest to which they were attached, causing an unnecessary gap after
the first note of a melisma.

This commit prevents a melisma from adding a right spacer to
their first ChordRest, and rather creates a right
spacer on the last ChordRest of a lyric if necessary.

In pursuit of this, this commit refactors ChordRest::_melismaEnd(s) from
a bool to a std::set<*Lyrics>, giving a ChordRest a way to access the
melismatic Lyrics that end on it. This change also solves the problem of
said bool being untrustworthy (i.e. erroneously being changged to false
when one of multiple melismas was removed).

Duplicate of musescore#8296
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Aug 19, 2021
Previously, melismas were treated the same as normal Lyrics in terms of
horizontal spacing—they would cause a spacer to be added to the
ChordRest to which they were attached, causing an unnecessary gap after
the first note of a melisma.

This commit prevents a melisma from adding a right spacer to
their first ChordRest, and rather creates a right
spacer on the last ChordRest of a lyric if necessary.

In pursuit of this, this commit refactors ChordRest::_melismaEnd(s) from
a bool to a std::set<*Lyrics>, giving a ChordRest a way to access the
melismatic Lyrics that end on it. This change also solves the problem of
said bool being untrustworthy (i.e. erroneously being changged to false
when one of multiple melismas was removed).

Duplicate of musescore#8296
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Aug 19, 2021
This commit adds a case for including fretboard diagrams when
creating horizontal spacing in the ChordRest::shape() function. In
pursuit of this, it also extracts a calculateBoundingRect function from
FretDiagram::layout().

NOTE: In order to allow "orphaned" FretDiagrams to still create space,
the spacer is added to all staves. This is redundant in some cases, so
a more performant solution may be desirable in the future.

Duplicate of musescore#8296
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Aug 19, 2021
Previously, melismas were treated the same as normal Lyrics in terms of
horizontal spacing—they would cause a spacer to be added to the
ChordRest to which they were attached, causing an unnecessary gap after
the first note of a melisma.

This commit prevents a melisma from adding a right spacer to
their first ChordRest, and rather creates a right
spacer on the last ChordRest of a lyric if necessary.

In pursuit of this, this commit refactors ChordRest::_melismaEnd(s) from
a bool to a std::set<*Lyrics>, giving a ChordRest a way to access the
melismatic Lyrics that end on it. This change also solves the problem of
said bool being untrustworthy (i.e. erroneously being changged to false
when one of multiple melismas was removed).

Duplicate of musescore#8296
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Aug 19, 2021
This commit adds a case for including fretboard diagrams when
creating horizontal spacing in the ChordRest::shape() function. In
pursuit of this, it also extracts a calculateBoundingRect function from
FretDiagram::layout().

NOTE: In order to allow "orphaned" FretDiagrams to still create space,
the spacer is added to all staves. This is redundant in some cases, so
a more performant solution may be desirable in the future.

Duplicate of musescore#8296
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Aug 30, 2021
Previously, melismas were treated the same as normal Lyrics in terms of
horizontal spacing—they would cause a spacer to be added to the
ChordRest to which they were attached, causing an unnecessary gap after
the first note of a melisma.

This commit prevents a melisma from adding a right spacer to
their first ChordRest, and rather creates a right
spacer on the last ChordRest of a lyric if necessary.

In pursuit of this, this commit refactors ChordRest::_melismaEnd(s) from
a bool to a std::set<*Lyrics>, giving a ChordRest a way to access the
melismatic Lyrics that end on it. This change also solves the problem of
said bool being untrustworthy (i.e. erroneously being changged to false
when one of multiple melismas was removed).

Duplicate of musescore#8296
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Aug 30, 2021
This commit adds a case for including fretboard diagrams when
creating horizontal spacing in the ChordRest::shape() function. In
pursuit of this, it also extracts a calculateBoundingRect function from
FretDiagram::layout().

NOTE: In order to allow "orphaned" FretDiagrams to still create space,
the spacer is added to all staves. This is redundant in some cases, so
a more performant solution may be desirable in the future.

Duplicate of musescore#8296
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 1, 2021
Previously, melismas were treated the same as normal Lyrics in terms of
horizontal spacing—they would cause a spacer to be added to the
ChordRest to which they were attached, causing an unnecessary gap after
the first note of a melisma.

This commit prevents a melisma from adding a right spacer to
their first ChordRest, and rather creates a right
spacer on the last ChordRest of a lyric if necessary.

In pursuit of this, this commit refactors ChordRest::_melismaEnd(s) from
a bool to a std::set<*Lyrics>, giving a ChordRest a way to access the
melismatic Lyrics that end on it. This change also solves the problem of
said bool being untrustworthy (i.e. erroneously being changged to false
when one of multiple melismas was removed).

Duplicate of musescore#8296
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 1, 2021
This commit adds a case for including fretboard diagrams when
creating horizontal spacing in the ChordRest::shape() function. In
pursuit of this, it also extracts a calculateBoundingRect function from
FretDiagram::layout().

NOTE: In order to allow "orphaned" FretDiagrams to still create space,
the spacer is added to all staves. This is redundant in some cases, so
a more performant solution may be desirable in the future.

Duplicate of musescore#8296
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 2, 2021
Previously, melismas were treated the same as normal Lyrics in terms of
horizontal spacing—they would cause a spacer to be added to the
ChordRest to which they were attached, causing an unnecessary gap after
the first note of a melisma.

This commit prevents a melisma from adding a right spacer to
their first ChordRest, and rather creates a right
spacer on the last ChordRest of a lyric if necessary.

In pursuit of this, this commit refactors ChordRest::_melismaEnd(s) from
a bool to a std::set<*Lyrics>, giving a ChordRest a way to access the
melismatic Lyrics that end on it. This change also solves the problem of
said bool being untrustworthy (i.e. erroneously being changged to false
when one of multiple melismas was removed).

Duplicate of musescore#8296
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 2, 2021
This commit adds a case for including fretboard diagrams when
creating horizontal spacing in the ChordRest::shape() function. In
pursuit of this, it also extracts a calculateBoundingRect function from
FretDiagram::layout().

NOTE: In order to allow "orphaned" FretDiagrams to still create space,
the spacer is added to all staves. This is redundant in some cases, so
a more performant solution may be desirable in the future.

Duplicate of musescore#8296
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 10, 2021
Previously, melismas were treated the same as normal Lyrics in terms of
horizontal spacing—they would cause a spacer to be added to the
ChordRest to which they were attached, causing an unnecessary gap after
the first note of a melisma.

This commit prevents a melisma from adding a right spacer to
their first ChordRest, and rather creates a right
spacer on the last ChordRest of a lyric if necessary.

In pursuit of this, this commit refactors ChordRest::_melismaEnd(s) from
a bool to a std::set<*Lyrics>, giving a ChordRest a way to access the
melismatic Lyrics that end on it. This change also solves the problem of
said bool being untrustworthy (i.e. erroneously being changged to false
when one of multiple melismas was removed).

Duplicate of musescore#8296
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 10, 2021
This commit adds a case for including fretboard diagrams when
creating horizontal spacing in the ChordRest::shape() function. In
pursuit of this, it also extracts a calculateBoundingRect function from
FretDiagram::layout().

NOTE: In order to allow "orphaned" FretDiagrams to still create space,
the spacer is added to all staves. This is redundant in some cases, so
a more performant solution may be desirable in the future.

Duplicate of musescore#8296
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 23, 2021
Previously, melismas were treated the same as normal Lyrics in terms of
horizontal spacing—they would cause a spacer to be added to the
ChordRest to which they were attached, causing an unnecessary gap after
the first note of a melisma.

This commit prevents a melisma from adding a right spacer to
their first ChordRest, and rather creates a right
spacer on the last ChordRest of a lyric if necessary.

In pursuit of this, this commit refactors ChordRest::_melismaEnd(s) from
a bool to a std::set<*Lyrics>, giving a ChordRest a way to access the
melismatic Lyrics that end on it. This change also solves the problem of
said bool being untrustworthy (i.e. erroneously being changged to false
when one of multiple melismas was removed).

Duplicate of musescore#8296
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Sep 23, 2021
This commit adds a case for including fretboard diagrams when
creating horizontal spacing in the ChordRest::shape() function. In
pursuit of this, it also extracts a calculateBoundingRect function from
FretDiagram::layout().

NOTE: In order to allow "orphaned" FretDiagrams to still create space,
the spacer is added to all staves. This is redundant in some cases, so
a more performant solution may be desirable in the future.

Duplicate of musescore#8296
@Jojo-Schmitz
Copy link
Contributor

Jojo-Schmitz commented Jan 17, 2022

The 1st commit (ENG-34: Fix erroneous space created for melismas) causes a regression, visible on musescore.com too now, Sample score attached: lyrics-test.zip
Image before this commit:
image
Image after this commit:
image
On top it gets completely screwed up and out of hand when doing Ctrl+A, Ctrl+R, and worsens step-by-step:
image
image
image
image
...
Not (yet(?) an issue with the master branch, apparently that change hasn't yet been ported over from 3.6.2_backend to master?

Now reported as issue #10286

Jojo-Schmitz added a commit to Jojo-Schmitz/MuseScore that referenced this pull request Jan 17, 2022
This reverts the 1st part of PR musescore#8296, which is causeing a regression.
Jojo-Schmitz added a commit to Jojo-Schmitz/MuseScore that referenced this pull request Jan 17, 2022
This reverts the 1st part of PR musescore#8296, which is causeing a regression.
Jojo-Schmitz added a commit to Jojo-Schmitz/MuseScore that referenced this pull request Jan 17, 2022
This reverts the 1st part of PR musescore#8296, which is causing a regression.
Jojo-Schmitz added a commit to Jojo-Schmitz/MuseScore that referenced this pull request Feb 4, 2022
This reverts the 1st part of PR musescore#8296, which is causing a regression.
Jojo-Schmitz added a commit to Jojo-Schmitz/MuseScore that referenced this pull request Feb 5, 2022
This reverts the 1st part of PR musescore#8296, which is causing a regression.
Jojo-Schmitz added a commit to Jojo-Schmitz/MuseScore that referenced this pull request Feb 7, 2022
This reverts the 1st part of PR musescore#8296, which is causing a regression.
Jojo-Schmitz added a commit to Jojo-Schmitz/MuseScore that referenced this pull request Feb 24, 2022
This reverts the 1st part of PR musescore#8296, which is causing a regression.
Jojo-Schmitz added a commit to Jojo-Schmitz/MuseScore that referenced this pull request May 12, 2022
This reverts the 1st part of PR musescore#8296, which is causing a regression.
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Mar 5, 2023
Previously, melismas were treated the same as normal Lyrics in terms of
horizontal spacing—they would cause a spacer to be added to the
ChordRest to which they were attached, causing an unnecessary gap after
the first note of a melisma.

This commit prevents a melisma from adding a right spacer to
their first ChordRest, and rather creates a right
spacer on the last ChordRest of a lyric if necessary.

In pursuit of this, this commit refactors ChordRest::_melismaEnd(s) from
a bool to a std::set<*Lyrics>, giving a ChordRest a way to access the
melismatic Lyrics that end on it. This change also solves the problem of
said bool being untrustworthy (i.e. erroneously being changged to false
when one of multiple melismas was removed).

Duplicate of musescore#8296
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Mar 5, 2023
This commit adds a case for including fretboard diagrams when
creating horizontal spacing in the ChordRest::shape() function. In
pursuit of this, it also extracts a calculateBoundingRect function from
FretDiagram::layout().

NOTE: In order to allow "orphaned" FretDiagrams to still create space,
the spacer is added to all staves. This is redundant in some cases, so
a more performant solution may be desirable in the future.

Duplicate of musescore#8296
Jojo-Schmitz added a commit to Jojo-Schmitz/MuseScore that referenced this pull request Mar 5, 2023
This reverts the 1st part of PR musescore#8296, which is causing a regression.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants