-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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-54: Staff Visibility #8430
[MU3 Backend] ENG-54: Staff Visibility #8430
Conversation
Since HideMode::AUTO behaves in uncommon ways for most scores (hiding empty staves in a grand staff), this changes the hideWhenEmpty to INSTRUMENT when creating the Staffs upon import. In the case that a score part has a variable number of staves, it uses this to infer that we do truly want HideMode::AUTO.
Previously, a staff's emptiness was calculated based on its note and annotation content. Since this is evaluated before the system was laid out, the system did not have pointers to its SpannerSegments. This commit adds a way to include whether a staff has any spanners (particularly pedal markings and hanging slurs) in assessing emptiness, creating more consistent/expected hiding behavior in HideMode::AUTO.
Since HideMode::AUTO behaves in uncommon ways for most scores (hiding empty staves in a grand staff), this changes the hideWhenEmpty to INSTRUMENT when creating the Staffs upon import. In the case that a score part has a variable number of staves, it uses this to infer that we do truly want HideMode::AUTO. Duplicate of musescore#8430, part 1
Previously, a staff's emptiness was calculated based on its note and annotation content. Since this is evaluated before the system was laid out, the system did not have pointers to its SpannerSegments. This commit adds a way to include whether a staff has any spanners (particularly pedal markings and hanging slurs) in assessing emptiness, creating more consistent/expected hiding behavior in HideMode::AUTO. Duplicate of musescore#8430, part 2
Since HideMode::AUTO behaves in uncommon ways for most scores (hiding empty staves in a grand staff), this changes the hideWhenEmpty to INSTRUMENT when creating the Staffs upon import. In the case that a score part has a variable number of staves, it uses this to infer that we do truly want HideMode::AUTO. Duplicate of musescore#8430, part 1
Previously, a staff's emptiness was calculated based on its note and annotation content. Since this is evaluated before the system was laid out, the system did not have pointers to its SpannerSegments. This commit adds a way to include whether a staff has any spanners (particularly pedal markings and hanging slurs) in assessing emptiness, creating more consistent/expected hiding behavior in HideMode::AUTO. Duplicate of musescore#8430, part 2
@@ -1339,6 +1343,12 @@ void Score::hideEmptyStaves(System* system, bool isFirstSystem) | |||
&& !(isFirstSystem && styleB(Sid::dontHideStavesInFirstSystem)) | |||
&& hideMode != Staff::HideMode::NEVER)) { | |||
bool hideStaff = true; | |||
for (auto spanner : spanners) { | |||
if (spanner.value->staff() == staff) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There a (big!) problem with this: Voltas now cause an otherwise empty and therefor hidden top staff to become visible.
So all Voltas (and other 'system' type spanners, like "System Text Line") need to somehow get excluded from this check.
This is certainly important for the 3.6.2_backend but even more so when this PR gets ported over to master.
Simlpe fix seems to be to add && !spanner.value->systemFlag()
to the condition here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! I'll go ahead and make that tweak today, as well as add something to the test case to catch future regressions of that specific variety.
Since HideMode::AUTO behaves in uncommon ways for most scores (hiding empty staves in a grand staff), this changes the hideWhenEmpty to INSTRUMENT when creating the Staffs upon import. In the case that a score part has a variable number of staves, it uses this to infer that we do truly want HideMode::AUTO. Duplicate of musescore#8430, part 1
Previously, a staff's emptiness was calculated based on its note and annotation content. Since this is evaluated before the system was laid out, the system did not have pointers to its SpannerSegments. This commit adds a way to include whether a staff has any spanners (particularly pedal markings and hanging slurs) in assessing emptiness, creating more consistent/expected hiding behavior in HideMode::AUTO. Duplicate of musescore#8430, part 2
Since HideMode::AUTO behaves in uncommon ways for most scores (hiding empty staves in a grand staff), this changes the hideWhenEmpty to INSTRUMENT when creating the Staffs upon import. In the case that a score part has a variable number of staves, it uses this to infer that we do truly want HideMode::AUTO. Duplicate of musescore#8430, part 1
Previously, a staff's emptiness was calculated based on its note and annotation content. Since this is evaluated before the system was laid out, the system did not have pointers to its SpannerSegments. This commit adds a way to include whether a staff has any spanners (particularly pedal markings and hanging slurs) in assessing emptiness, creating more consistent/expected hiding behavior in HideMode::AUTO. Duplicate of musescore#8430, part 2
Since HideMode::AUTO behaves in uncommon ways for most scores (hiding empty staves in a grand staff), this changes the hideWhenEmpty to INSTRUMENT when creating the Staffs upon import. In the case that a score part has a variable number of staves, it uses this to infer that we do truly want HideMode::AUTO. Duplicate of musescore#8430, part 1
Previously, a staff's emptiness was calculated based on its note and annotation content. Since this is evaluated before the system was laid out, the system did not have pointers to its SpannerSegments. This commit adds a way to include whether a staff has any spanners (particularly pedal markings and hanging slurs) in assessing emptiness, creating more consistent/expected hiding behavior in HideMode::AUTO. Duplicate of musescore#8430, part 2
Since HideMode::AUTO behaves in uncommon ways for most scores (hiding empty staves in a grand staff), this changes the hideWhenEmpty to INSTRUMENT when creating the Staffs upon import. In the case that a score part has a variable number of staves, it uses this to infer that we do truly want HideMode::AUTO. Duplicate of musescore#8430, part 1
Previously, a staff's emptiness was calculated based on its note and annotation content. Since this is evaluated before the system was laid out, the system did not have pointers to its SpannerSegments. This commit adds a way to include whether a staff has any spanners (particularly pedal markings and hanging slurs) in assessing emptiness, creating more consistent/expected hiding behavior in HideMode::AUTO. Duplicate of musescore#8430, part 2
Since HideMode::AUTO behaves in uncommon ways for most scores (hiding empty staves in a grand staff), this changes the hideWhenEmpty to INSTRUMENT when creating the Staffs upon import. In the case that a score part has a variable number of staves, it uses this to infer that we do truly want HideMode::AUTO. Duplicate of musescore#8430, part 1
Previously, a staff's emptiness was calculated based on its note and annotation content. Since this is evaluated before the system was laid out, the system did not have pointers to its SpannerSegments. This commit adds a way to include whether a staff has any spanners (particularly pedal markings and hanging slurs) in assessing emptiness, creating more consistent/expected hiding behavior in HideMode::AUTO. Duplicate of musescore#8430, part 2
Since HideMode::AUTO behaves in uncommon ways for most scores (hiding empty staves in a grand staff), this changes the hideWhenEmpty to INSTRUMENT when creating the Staffs upon import. In the case that a score part has a variable number of staves, it uses this to infer that we do truly want HideMode::AUTO. Duplicate of musescore#8430, part 1
Previously, a staff's emptiness was calculated based on its note and annotation content. Since this is evaluated before the system was laid out, the system did not have pointers to its SpannerSegments. This commit adds a way to include whether a staff has any spanners (particularly pedal markings and hanging slurs) in assessing emptiness, creating more consistent/expected hiding behavior in HideMode::AUTO. Duplicate of musescore#8430, part 2
Since HideMode::AUTO behaves in uncommon ways for most scores (hiding empty staves in a grand staff), this changes the hideWhenEmpty to INSTRUMENT when creating the Staffs upon import. In the case that a score part has a variable number of staves, it uses this to infer that we do truly want HideMode::AUTO. Duplicate of musescore#8430, part 1
Previously, a staff's emptiness was calculated based on its note and annotation content. Since this is evaluated before the system was laid out, the system did not have pointers to its SpannerSegments. This commit adds a way to include whether a staff has any spanners (particularly pedal markings and hanging slurs) in assessing emptiness, creating more consistent/expected hiding behavior in HideMode::AUTO. Duplicate of musescore#8430, part 2
Since HideMode::AUTO behaves in uncommon ways for most scores (hiding empty staves in a grand staff), this changes the hideWhenEmpty to INSTRUMENT when creating the Staffs upon import. In the case that a score part has a variable number of staves, it uses this to infer that we do truly want HideMode::AUTO. Duplicate of musescore#8430, part 1
Previously, a staff's emptiness was calculated based on its note and annotation content. Since this is evaluated before the system was laid out, the system did not have pointers to its SpannerSegments. This commit adds a way to include whether a staff has any spanners (particularly pedal markings and hanging slurs) in assessing emptiness, creating more consistent/expected hiding behavior in HideMode::AUTO. Duplicate of musescore#8430, part 2
Since HideMode::AUTO behaves in uncommon ways for most scores (hiding empty staves in a grand staff), this changes the hideWhenEmpty to INSTRUMENT when creating the Staffs upon import. In the case that a score part has a variable number of staves, it uses this to infer that we do truly want HideMode::AUTO. Duplicate of musescore#8430, part 1
Previously, a staff's emptiness was calculated based on its note and annotation content. Since this is evaluated before the system was laid out, the system did not have pointers to its SpannerSegments. This commit adds a way to include whether a staff has any spanners (particularly pedal markings and hanging slurs) in assessing emptiness, creating more consistent/expected hiding behavior in HideMode::AUTO. Duplicate of musescore#8430, part 2
Since HideMode::AUTO behaves in uncommon ways for most scores (hiding empty staves in a grand staff), this changes the hideWhenEmpty to INSTRUMENT when creating the Staffs upon import. In the case that a score part has a variable number of staves, it uses this to infer that we do truly want HideMode::AUTO. Duplicate of musescore#8430, part 1
Previously, a staff's emptiness was calculated based on its note and annotation content. Since this is evaluated before the system was laid out, the system did not have pointers to its SpannerSegments. This commit adds a way to include whether a staff has any spanners (particularly pedal markings and hanging slurs) in assessing emptiness, creating more consistent/expected hiding behavior in HideMode::AUTO. Duplicate of musescore#8430, part 2
Since HideMode::AUTO behaves in uncommon ways for most scores (hiding empty staves in a grand staff), this changes the hideWhenEmpty to INSTRUMENT when creating the Staffs upon import. In the case that a score part has a variable number of staves, it uses this to infer that we do truly want HideMode::AUTO. Duplicate of musescore#8430, part 1
Previously, a staff's emptiness was calculated based on its note and annotation content. Since this is evaluated before the system was laid out, the system did not have pointers to its SpannerSegments. This commit adds a way to include whether a staff has any spanners (particularly pedal markings and hanging slurs) in assessing emptiness, creating more consistent/expected hiding behavior in HideMode::AUTO. Duplicate of musescore#8430, part 2
Port of musescore#8430, part 2: Previously, a staff's emptiness was calculated based on its note and annotation content. Since this is evaluated before the system was laid out, the system did not have pointers to its SpannerSegments. This commit adds a way to include whether a staff has any spanners (particularly pedal markings and hanging slurs) in assessing emptiness, creating more consistent/expected hiding behavior in HideMode::AUTO. Plus port of musescore#8527: This commit tweaks the changes from commit 54ebee4 (which checks for spanners when assessing staff emptiness) and ignores spanners that are "system" spanners (such as voltas or system text). This prevents a false-positive unhiding in the case of such system spanners. Also, it prevents another false positive that occurred hen a spanner started on the first tick of the next system. Plus fixing a regression with hairpins, resulting in the next system's stafes to become unhidden
Port of musescore#8430, part 2: Previously, a staff's emptiness was calculated based on its note and annotation content. Since this is evaluated before the system was laid out, the system did not have pointers to its SpannerSegments. This commit adds a way to include whether a staff has any spanners (particularly pedal markings and hanging slurs) in assessing emptiness, creating more consistent/expected hiding behavior in HideMode::AUTO. Plus port of musescore#8527: This commit tweaks the changes from commit 54ebee4 (which checks for spanners when assessing staff emptiness) and ignores spanners that are "system" spanners (such as voltas or system text). This prevents a false-positive unhiding in the case of such system spanners. Also, it prevents another false positive that occurred hen a spanner started on the first tick of the next system. Plus fixing a regression with hairpins, resulting in the next system's staves to become unhidden
Port of musescore#8430, part 2: Previously, a staff's emptiness was calculated based on its note and annotation content. Since this is evaluated before the system was laid out, the system did not have pointers to its SpannerSegments. This commit adds a way to include whether a staff has any spanners (particularly pedal markings and hanging slurs) in assessing emptiness, creating more consistent/expected hiding behavior in HideMode::AUTO. Plus port of musescore#8527: This commit tweaks the changes from commit 54ebee4 (which checks for spanners when assessing staff emptiness) and ignores spanners that are "system" spanners (such as voltas or system text). This prevents a false-positive unhiding in the case of such system spanners. Also, it prevents another false positive that occurred hen a spanner started on the first tick of the next system. Plus fixing a regression with hairpins, resulting in the next system's staves to become unhidden
Port of musescore#8430, part 2: Previously, a staff's emptiness was calculated based on its note and annotation content. Since this is evaluated before the system was laid out, the system did not have pointers to its SpannerSegments. This commit adds a way to include whether a staff has any spanners (particularly pedal markings and hanging slurs) in assessing emptiness, creating more consistent/expected hiding behavior in HideMode::AUTO. Plus port of musescore#8527: This commit tweaks the changes from commit 54ebee4 (which checks for spanners when assessing staff emptiness) and ignores spanners that are "system" spanners (such as voltas or system text). This prevents a false-positive unhiding in the case of such system spanners. Also, it prevents another false positive that occurred hen a spanner started on the first tick of the next system. Plus fixing a regression with hairpins, resulting in the next system's staves to become unhidden.
Since HideMode::AUTO behaves in uncommon ways for most scores (hiding empty staves in a grand staff), this changes the hideWhenEmpty to INSTRUMENT when creating the Staffs upon import. In the case that a score part has a variable number of staves, it uses this to infer that we do truly want HideMode::AUTO. Port of musescore#8430, part 1
Previously, a staff's emptiness was calculated based on its note and annotation content. Since this is evaluated before the system was laid out, the system did not have pointers to its SpannerSegments. This commit adds a way to include whether a staff has any spanners (particularly pedal markings and hanging slurs) in assessing emptiness, creating more consistent/expected hiding behavior in HideMode::AUTO. Port of musescore#8430, part 2
Previously, a staff's emptiness was calculated based on its note and annotation content. Since this is evaluated before the system was laid out, the system did not have pointers to its SpannerSegments. This commit adds a way to include whether a staff has any spanners (particularly pedal markings and hanging slurs) in assessing emptiness, creating more consistent/expected hiding behavior in HideMode::AUTO. Port of musescore#8430, part 2
Previously, a staff's emptiness was calculated based on its note and annotation content. Since this is evaluated before the system was laid out, the system did not have pointers to its SpannerSegments. This commit adds a way to include whether a staff has any spanners (particularly pedal markings and hanging slurs) in assessing emptiness, creating more consistent/expected hiding behavior in HideMode::AUTO. Port of musescore#8430, part 2
Previously, a staff's emptiness was calculated based on its note and annotation content. Since this is evaluated before the system was laid out, the system did not have pointers to its SpannerSegments. This commit adds a way to include whether a staff has any spanners (particularly pedal markings and hanging slurs) in assessing emptiness, creating more consistent/expected hiding behavior in HideMode::AUTO. Port of musescore#8430, part 2
Previously, a staff's emptiness was calculated based on its note and annotation content. Since this is evaluated before the system was laid out, the system did not have pointers to its SpannerSegments. This commit adds a way to include whether a staff has any spanners (particularly pedal markings and hanging slurs) in assessing emptiness, creating more consistent/expected hiding behavior in HideMode::AUTO. Port of musescore#8430, part 2
Resolves: ENG-54: Show both staves of grand staff even when one is empty
Since HideMode::AUTO behaves in uncommon ways for most scores (hiding
empty staves in a grand staff), this changes the hideWhenEmpty to
INSTRUMENT when creating the Staffs upon import. In the case that a
score part has a variable number of staves, it uses this to infer that
we do truly want HideMode::AUTO.
Previously, a staff's emptiness was calculated based on its note and
annotation content. Since this is evaluated before the system was laid
out, the system did not have pointers to its SpannerSegments. This
commit adds a way to include whether a staff has any spanners
(particularly pedal markings and hanging slurs) in assessing emptiness,
creating more consistent/expected hiding behavior in HideMode::AUTO.