Fix #307741 images attached to measures don't propagate between score and existing parts #6330
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves: https://musescore.org/en/node/307741.
#5445 made images added to measures children of the measure rather than children of the measure's first segment. This turned out to be not such a great idea after all, since it really only solved a problem that is better solved by simply turning off automatic placement for the image. So this reverts that change.
http://musescore.org/en/node/292606 is better solved by making sure to layout images within Score::layoutSystemElements(). Since there is no way to know the purpose of any particular image, I do not know that we can come up with a better ordering of the layout of images in relation to other system elements.
Finally, regarding https://musescore.org/en/node/307741, there is code to correctly deal with images, but it is not reached unless ElementType::IMAGE is excluded from what is handled earlier.