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

fix #78636: insert before frame fails #2302

Merged
merged 1 commit into from
Mar 12, 2016

Conversation

MarcSabatella
Copy link
Contributor

If you select a frame in a score that does not have linked parts, then try to insert either a measure or a frame before it, the measure/frame is actually appended to the end ather than being inserted before the selected frame. That's because searchMeasureBase() was returning nullptr in this case. Fixed to return the original frame.

BTW, in the case of inserting measures, this bug was also "corrupting" any spanners present after the insertion point, because undoInsertTime() was still inserting the time at the proper place even though the measures themselves were being appended to the end.

@MarcSabatella
Copy link
Contributor Author

Yikes, allowing the insert before a frame to succeed leads to a crash if you try to insert a measure before a frame. I guess that's why it was disabled. Still, hopefully another easy fix.

@MarcSabatella
Copy link
Contributor Author

Crash fixed; there was an ill-advised cast from MeasureBase to Measure. Changed to use tick2measure() instead.

@MarcSabatella
Copy link
Contributor Author

I thought about that, but based on my understanding of what an FBOX was intended for, I am not sure it makes sense from a user perspective to select one before inserting a measure, any more than it makes sense to select a fret diagram, or a dynamic marking or any other random element. You'd select the measure the FBOX appears to be attached to (even if internally, it isn't implemented that way - still not clear).

@Jojo-Schmitz
Copy link
Contributor

OK, makes sense ;-)

@MarcSabatella
Copy link
Contributor Author

We might want to consider this for 2.0.3. Not so much on account of the fact that frames are appended instead of inserted (a nuisance, but not a serious problem), but because of the bad effect on spanners. The fix itself should be pretty safe I think.

@Jojo-Schmitz
Copy link
Contributor

I find the nuisance bad enough and as long as it doesn't break compatibility I don't see a real reason not to include it

lasconic added a commit that referenced this pull request Mar 12, 2016
fix #78636: insert before frame fails
@lasconic lasconic merged commit b9aa72f into musescore:master Mar 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants