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

[MU4] fix#15513 Enable pedals to take the whole part into consideration when extending #5123

Closed
wants to merge 1 commit into from

Conversation

L0uisc
Copy link
Contributor

@L0uisc L0uisc commented Jun 12, 2019

Pedal lines can now extend to notes in another staff of the same part too. To enable that, I added an enum class named ElementScope in element.h. This enum has basically an identical function to the DynRange enum in dynamic.h, but only adds one more range: VOICE. This lays the groundwork for making the "Range" concept applicable to a broader range of different elements. Those which doesn't need it doesn't need to use it anywhere else than setting it to an appropriate default in its constructor.

class Element : public ScoreElement {
ElementScope _scope { ElementScope::STAFF };
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make more sense to implement this as a virtual function that returns ElementScope::STAFF in class Element, but can be overridden in class Pedal to return ElementScope::PART?

Copy link
Contributor Author

@L0uisc L0uisc Jun 13, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might. I'll have to think a bit. I want this to enable users to set the scope for which the element has effect in the inspector. Hard-coding it in the class definition for each element won't work for that.

My other option was to make the _scope member protected and only implementing accessors where I want to expose the value publicly (as in dynamics, so that the Inspector can set its scope, or haripins and cresc./dim. lines).

else if (ed.curGrip == Grip::END || ed.curGrip == Grip::MIDDLE) {
Segment* ns2 = nextSeg1(s2, track2);
Segment* ns2{ nextSeg1(s2, track2, startTrack, endTrack) };
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A space is missing here before the {.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, Visual Studio likes to eat those spaces before the opening curly brace in an initializer. Will update together with the code for your other comment when we figured the other one out.

@igorkorsukov igorkorsukov changed the title fix#15513 Enable pedals to take the whole part into consideration when extending [MU4] fix#15513 Enable pedals to take the whole part into consideration when extending Feb 5, 2021
@vpereverzev vpereverzev added the archived PRs that have gone stale but could potentially be revived in the future label Apr 5, 2021
@vpereverzev
Copy link
Member

Archived for in-activity

@vpereverzev vpereverzev closed this Apr 5, 2021
@L0uisc L0uisc deleted the pedal branch January 25, 2023 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
archived PRs that have gone stale but could potentially be revived in the future
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants