-
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
Fix issues discovered while moving grip handles around on trills #8600
Conversation
@@ -2156,6 +2156,9 @@ System* Score::getNextSystem(LayoutContext& lc) | |||
if (!isVBox) { | |||
int nstaves = Score::nstaves(); | |||
system->adjustStavesNumber(nstaves); | |||
for (int i = 0; i < nstaves; ++i) { | |||
system->staff(i)->setShow(score()->staff(i)->show()); | |||
} |
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.
without this, it "remembers" which staves were hidden for this system on the previous layout, but that changes whether it takes into account the instrument name when calculating the width, meaning you can get a different result depending on the state of the cache.
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.
This change, backported to the 3.x branch, causes MuseScore(3.exe) to crash (in Debug builds, QtCreator, MinGW)), on opening any score due to a failed assertion in Qt:
Fatal: ASSERT failure in QList::operator[]: "index out of range", file C:/Qt/5.15.2/mingw81_64/include/QtCore/qlist.h, line 575
Not sure how relevant this is to the master branch though.
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.
I worked this fix out in MU3 and if it's crashing there (which it wasn't for me) it's wrong in MU4 too - I'll have a look when I can.
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.
It certainly crashes for me. The branch I tried it on is not a plain 3.x with just that commit though, so there might be interaction with other commits.
I'm trying that now...
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.
Oops, I added these 3 lines a line too late (before the system->adjustStavesNumber(nstaves);
rather than after), downside of an all-manual cherry-pick. Have a brown bag for me?
Sorry for the noise...
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.
Yeah I was pretty sure it was OK! Took me hours to work out what that problem was too BTW, surprised it was such a simple change in the end, and a bit surprised it doesn't cause more weird layout issues.
@@ -432,7 +432,7 @@ Segment* LineSegment::findSegmentForGrip(Grip grip, PointF pos) const | |||
System* sys = oldSeg->system(); | |||
const QList<System*> foundSystems = score()->searchSystem(pos, sys, spacingFactor); | |||
|
|||
if (!foundSystems.empty() && !foundSystems.contains(sys)) { | |||
if (!foundSystems.empty() && !foundSystems.contains(sys) && foundSystems[0]->staves()->size()) { |
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.
ignore 0-staff systems (used for V-Boxes etc.) when trying to find system during grip handle dragging
…p handles around on trills Two unrelated issues, neither really to do with trill lines specifically at all but both discovered at the same time: a) if you drag the grip handle from any line into a 0-stave system (e.g. for a V-frame, as new scores have by default at the top of the score), it crashes b) a bug in the layout engine where it reused cached information from a previous layout caused erratic behaviour when dragging grip handles around, though it could be triggered in other ways, Backport of musescore#8600
…p handles around on trills Two unrelated issues, neither really to do with trill lines specifically at all but both discovered at the same time: a) if you drag the grip handle from any line into a 0-stave system (e.g. for a V-frame, as new scores have by default at the top of the score), it crashes b) a bug in the layout engine where it reused cached information from a previous layout caused erratic behaviour when dragging grip handles around, though it could be triggered in other ways, Backport of musescore#8600
…p handles around on trills Two unrelated issues, neither really to do with trill lines specifically at all but both discovered at the same time: a) if you drag the grip handle from any line into a 0-stave system (e.g. for a V-frame, as new scores have by default at the top of the score), it crashes b) a bug in the layout engine where it reused cached information from a previous layout caused erratic behaviour when dragging grip handles around, though it could be triggered in other ways, Backport of musescore#8600
…p handles around on trills Two unrelated issues, neither really to do with trill lines specifically at all but both discovered at the same time: a) if you drag the grip handle from any line into a 0-stave system (e.g. for a V-frame, as new scores have by default at the top of the score), it crashes b) a bug in the layout engine where it reused cached information from a previous layout caused erratic behaviour when dragging grip handles around, though it could be triggered in other ways, Backport of musescore#8600
…p handles around on trills Two unrelated issues, neither really to do with trill lines specifically at all but both discovered at the same time: a) if you drag the grip handle from any line into a 0-stave system (e.g. for a V-frame, as new scores have by default at the top of the score), it crashes b) a bug in the layout engine where it reused cached information from a previous layout caused erratic behaviour when dragging grip handles around, though it could be triggered in other ways, Backport of musescore#8600
…p handles around on trills Two unrelated issues, neither really to do with trill lines specifically at all but both discovered at the same time: a) if you drag the grip handle from any line into a 0-stave system (e.g. for a V-frame, as new scores have by default at the top of the score), it crashes b) a bug in the layout engine where it reused cached information from a previous layout caused erratic behaviour when dragging grip handles around, though it could be triggered in other ways, Backport of musescore#8600
…p handles around on trills Two unrelated issues, neither really to do with trill lines specifically at all but both discovered at the same time: a) if you drag the grip handle from any line into a 0-stave system (e.g. for a V-frame, as new scores have by default at the top of the score), it crashes b) a bug in the layout engine where it reused cached information from a previous layout caused erratic behaviour when dragging grip handles around, though it could be triggered in other ways, Backport of musescore#8600
…p handles around on trills Two unrelated issues, neither really to do with trill lines specifically at all but both discovered at the same time: a) if you drag the grip handle from any line into a 0-stave system (e.g. for a V-frame, as new scores have by default at the top of the score), it crashes b) a bug in the layout engine where it reused cached information from a previous layout caused erratic behaviour when dragging grip handles around, though it could be triggered in other ways, Backport of musescore#8600
…p handles around on trills Two unrelated issues, neither really to do with trill lines specifically at all but both discovered at the same time: a) if you drag the grip handle from any line into a 0-stave system (e.g. for a V-frame, as new scores have by default at the top of the score), it crashes b) a bug in the layout engine where it reused cached information from a previous layout caused erratic behaviour when dragging grip handles around, though it could be triggered in other ways, Backport of musescore#8600
…p handles around on trills Two unrelated issues, neither really to do with trill lines specifically at all but both discovered at the same time: a) if you drag the grip handle from any line into a 0-stave system (e.g. for a V-frame, as new scores have by default at the top of the score), it crashes b) a bug in the layout engine where it reused cached information from a previous layout caused erratic behaviour when dragging grip handles around, though it could be triggered in other ways, Backport of musescore#8600
It also solves https://musescore.org/en/node/323559. Yet another good candidate for backporting to 3.x (I'd have it ready, no rocket science with just 4 likes of code ;-)) and a 3.6.3! |
…p handles around on trills Two unrelated issues, neither really to do with trill lines specifically at all but both discovered at the same time: a) if you drag the grip handle from any line into a 0-stave system (e.g. for a V-frame, as new scores have by default at the top of the score), it crashes b) a bug in the layout engine where it reused cached information from a previous layout caused erratic behaviour when dragging grip handles around, though it could be triggered in other ways, Backport of musescore#8600
…p handles around on trills Two unrelated issues, neither really to do with trill lines specifically at all but both discovered at the same time: a) if you drag the grip handle from any line into a 0-stave system (e.g. for a V-frame, as new scores have by default at the top of the score), it crashes b) a bug in the layout engine where it reused cached information from a previous layout caused erratic behaviour when dragging grip handles around, though it could be triggered in other ways, Backport of musescore#8600
…p handles around on trills Two unrelated issues, neither really to do with trill lines specifically at all but both discovered at the same time: a) if you drag the grip handle from any line into a 0-stave system (e.g. for a V-frame, as new scores have by default at the top of the score), it crashes b) a bug in the layout engine where it reused cached information from a previous layout caused erratic behaviour when dragging grip handles around, though it could be triggered in other ways, Backport of musescore#8600
…p handles around on trills Two unrelated issues, neither really to do with trill lines specifically at all but both discovered at the same time: a) if you drag the grip handle from any line into a 0-stave system (e.g. for a V-frame, as new scores have by default at the top of the score), it crashes b) a bug in the layout engine where it reused cached information from a previous layout caused erratic behaviour when dragging grip handles around, though it could be triggered in other ways, Backport of musescore#8600
…p handles around on trills Two unrelated issues, neither really to do with trill lines specifically at all but both discovered at the same time: a) if you drag the grip handle from any line into a 0-stave system (e.g. for a V-frame, as new scores have by default at the top of the score), it crashes b) a bug in the layout engine where it reused cached information from a previous layout caused erratic behaviour when dragging grip handles around, though it could be triggered in other ways, Backport of musescore#8600
…p handles around on trills Two unrelated issues, neither really to do with trill lines specifically at all but both discovered at the same time: a) if you drag the grip handle from any line into a 0-stave system (e.g. for a V-frame, as new scores have by default at the top of the score), it crashes b) a bug in the layout engine where it reused cached information from a previous layout caused erratic behaviour when dragging grip handles around, though it could be triggered in other ways, Backport of musescore#8600
…p handles around on trills Two unrelated issues, neither really to do with trill lines specifically at all but both discovered at the same time: a) if you drag the grip handle from any line into a 0-stave system (e.g. for a V-frame, as new scores have by default at the top of the score), it crashes b) a bug in the layout engine where it reused cached information from a previous layout caused erratic behaviour when dragging grip handles around, though it could be triggered in other ways, Backport of musescore#8600
…p handles around on trills Two unrelated issues, neither really to do with trill lines specifically at all but both discovered at the same time: a) if you drag the grip handle from any line into a 0-stave system (e.g. for a V-frame, as new scores have by default at the top of the score), it crashes b) a bug in the layout engine where it reused cached information from a previous layout caused erratic behaviour when dragging grip handles around, though it could be triggered in other ways, Backport of musescore#8600
…p handles around on trills Two unrelated issues, neither really to do with trill lines specifically at all but both discovered at the same time: a) if you drag the grip handle from any line into a 0-stave system (e.g. for a V-frame, as new scores have by default at the top of the score), it crashes b) a bug in the layout engine where it reused cached information from a previous layout caused erratic behaviour when dragging grip handles around, though it could be triggered in other ways, Backport of musescore#8600
…p handles around on trills Two unrelated issues, neither really to do with trill lines specifically at all but both discovered at the same time: a) if you drag the grip handle from any line into a 0-stave system (e.g. for a V-frame, as new scores have by default at the top of the score), it crashes b) a bug in the layout engine where it reused cached information from a previous layout caused erratic behaviour when dragging grip handles around, though it could be triggered in other ways, Backport of musescore#8600
Resolves: https://musescore.org/en/node/322957 #8592
Two unrelated issues, neither really to do with trill lines specifically at all but both discovered at the same time:
a) if you drag the grip handle from any line into a 0-stave system (e.g. for a V-frame, as new scores have by default at the top of the score), it crashes
b) a bug in the layout engine where it reused cached information from a previous layout caused erratic behaviour when dragging grip handles around, though it could be triggered in other ways,