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

Rework anchor lines drawing #5738

Merged
merged 7 commits into from
Apr 16, 2020
Merged

Conversation

dmitrio95
Copy link
Contributor

This is a part of redesign of elements dragging system which I got split off the anchors_rebasing branch to make the amount of changes more manageable. This PR is dedicated to anchor lines drawing redesign and includes:

  • Support for drawing several anchor lines simultaneously so elements like hairpins could show both anchors at once (implemented by @vpereverzev);
  • Showing haiprins/lines anchors even if they are not being dragged to make their segment bindings more clear;
  • Making anchor lines reflect placement of the element for which they are drawn.

Possibly some more changes could be added in future.

@dmitrio95 dmitrio95 added the work in progress not finished work or not addressed review label Feb 20, 2020
@dmitrio95
Copy link
Contributor Author

The test failure is related to the issue #301436 which is already present in master, so it is better to fix that issue rather than this particular crash on a test scenario.

@dmitrio95 dmitrio95 force-pushed the anchors_drawing branch 3 times, most recently from 0b58f53 to 55a3600 Compare February 27, 2020 07:47
@dmitrio95 dmitrio95 force-pushed the anchors_drawing branch 2 times, most recently from 30365bb to 45488bf Compare March 6, 2020 08:50
@dmitrio95 dmitrio95 force-pushed the anchors_drawing branch 2 times, most recently from c2e06ae to a68c899 Compare March 19, 2020 20:46
@anatoly-os anatoly-os merged commit 613a4e3 into musescore:master Apr 16, 2020
@RobFog
Copy link

RobFog commented Apr 16, 2020

I reckon the "work in progress" label should go?

@dmitrio95 dmitrio95 deleted the anchors_drawing branch April 16, 2020 21:22
@@ -75,10 +75,14 @@ void ScoreView::doDragElement(QMouseEvent* ev)
mscore->play(e);
_score->setPlayNote(false);
}
QLineF anchor = e->dragAnchor();
QVector<QLineF> anchorLines = e->dragAnchorLines();
const QPointF pageOffset(e->findAncestor(ElementType::PAGE)->pos());
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this might be where we are getting the extra page offset that is causing https://musescore.org/en/node/306096. If I comment out the translate that happens below, it fixes the case at hand, but I'm not totally sure it doesn't break something else.

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.

6 participants