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
Fixed trigger assert on remove acc from ambitus #9831
Fixed trigger assert on remove acc from ambitus #9831
Conversation
void Ambitus::remove(EngravingItem* e) | ||
{ | ||
if (e->type() == ElementType::ACCIDENTAL) { | ||
//! NOTE Do nothing (removing _topAccid or _bottomAccid) |
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.
Why doing nothing? Via Inspector the Ambitus can get changed to a non-accidental note, why not via deleting the accidental 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.
Because they are deleted in
Ambitus::~Ambitus()
{
delete _topAccid;
delete _bottomAccid;
}
They hide somehow differently (I did not investigate in detail)
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.
But, using you patch, they don't disapear, so don't delete at all, unless you delete the entire Ambitus (only that would call the destructor)
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 had no plans to change the implementation and logic of Ambitus
.
I just avoided triggering the assertion, that is, I didn’t make worse than it was, I did it a little better.
Do you think it is necessary to reconsider the implementation of Ambitus
?
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.
Well, doing nothing here is certainly better than a crash
Tested #9447 on Win10, Mac12, LinuxMint 20.2 - FIXED Please merge into master @igorkorsukov Found another crash when using ambitus #9866 (not caused by the current PR) |
by ignoring the operation. Backport of musescore#9831
Fixed by just ignoring the operation, i.e. not removing the accidental. Instead do this via the Inspector. Backport of musescore#9831
Fixed by just ignoring the operation, i.e. not removing the accidental. Instead do this via the Inspector. Backport of musescore#9831
Fixed by just ignoring the operation, i.e. not removing the accidental. Instead do this via the Inspector. Backport of musescore#9831
Fixed by just ignoring the operation, i.e. not removing the accidental. Instead do this via the Inspector. Backport of musescore#9831
Fixed by just ignoring the operation, i.e. not removing the accidental. Instead do this via the Inspector. Backport of musescore#9831
Fixed by just ignoring the operation, i.e. not removing the accidental. Instead do this via the Inspector. Backport of musescore#9831
Fixed by just ignoring the operation, i.e. not removing the accidental. Instead do this via the Inspector. Backport of musescore#9831
Fixed by just ignoring the operation, i.e. not removing the accidental. Instead do this via the Inspector. Backport of musescore#9831
No description provided.