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

Rebase segment-anchored lines on dragging #5763

Merged
merged 16 commits into from
Apr 17, 2020

Conversation

dmitrio95
Copy link
Contributor

This PR (currently based on the branch from #5738) contains reworking dragging system, primarily related to dragging segment-anchored lines (like hairpins). These changes make hairpin anchors be recalculated based on actual hairpin position on dragging without the need to use special key combinations like Shift+arrow for this purpose. This should make editing score dynamics (as well as aspects related to other segment-anchored lines) easier.

@@ -98,7 +98,7 @@ class Articulation final : public Element {
virtual void write(XmlWriter& xml) const override;
virtual bool readProperties(XmlReader&) override;

virtual QLineF dragAnchor() const override;
QVector<QLineF> dragAnchorLines() const override;
Copy link
Contributor

Choose a reason for hiding this comment

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

I notice that you've removed virtual specifiers on member-function declarations that are declared as override, both here and elsewhere.

Is this a new official coding guideline?

I like having virtual there, even though it's technically redundant.

Copy link
Contributor Author

@dmitrio95 dmitrio95 Feb 27, 2020

Choose a reason for hiding this comment

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

No it isn't defined by any coding guidelines in MuseScore right now. But maybe we should come to some single style here.

Somewhat in defense of this change, Google C++ Style Guide suggests not writing virtual in this case:

Explicitly annotate overrides of virtual functions or virtual destructors with exactly one of an override or (less frequently) final specifier. Do not use virtual when declaring an override.

@dmitrio95 dmitrio95 added the work in progress not finished work or not addressed review label Feb 28, 2020
@dmitrio95 dmitrio95 force-pushed the anchors_rebasing branch 2 times, most recently from 6b3175d to 82eabca Compare March 19, 2020 20:46
@anatoly-os
Copy link
Contributor

@dmitrio95 rebase needed

@dmitrio95
Copy link
Contributor Author

Rebased

@anatoly-os anatoly-os merged commit f993cc2 into musescore:master Apr 17, 2020
@dmitrio95 dmitrio95 deleted the anchors_rebasing branch April 17, 2020 21:16
dmitrio95 added a commit to dmitrio95/MuseScore that referenced this pull request May 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
work in progress not finished work or not addressed review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants