if create parts while an element is selected, then that element in a part will appear to be selected
Lets says I currently have an element selected, example, this rest:
and then I decide to create parts via File->Parts->"New All". If I look in my parts, that rest appears to still selected, as indicated by the blue color. If I select another rest with my mouse, then it appears that both rests are selected:
But I believe only one of those rests is actually selected. Somehow that blue color persists when creating a part. I think the solution lies in not having the blueness be transferred to new part when initially creating a part.
Comments
You are probably right. Although it might not be the blue color itself that is inappropriately being copied; it may be the "selected" property. Anyhow, I've noticed this sort of thing before but never really stopped to think about the exact circumstances that lead to this.
Well I don't think it is the selectedness that gets copied over, because when I try to do some modification, for example make invisible, then that first blue rest which was selected before creating part won't respond to the V command.
I haven't looked at the code yet. But maybe it is something along what you are saying, whereby the selected property is copied over, but the list of selected elements is not...
In reply to I haven't looked at the code by ericfontainejazz
That's exactly what I think is happening. The selection itself is a property of the score - can be single, list, or range - and is maintained completely separately from the selected flag on the elements themselves. It isn't all that uncommon for things to go wrong that cause these to get out of sync, causing an element that is not in fact selected (not actually part of the selection) to nonetheless have its selected flag set - or vice versa. We've fixed quite a few issues like over the years, often having to do with spanners, where there is often confusion between the Spanner and the SpannerSegment elements.
In reply to That's exactly what I think by Marc Sabatella
I've created what I believe is a failing test case...although it seems at the moment that my test case produces a segfault during an ASSERT while creating parts...
https://github.com/ericfont/MuseScore/blob/7fae72a46b43febc45822048683a…
I'll investigate later. (That might be a seperate bug, or maybe I have something wrong with my test script).