creating part while element are selected will undesirably set the SELECTED flag for those cloned elements even though the part scores won't have a selection

• Jan 8, 2019 - 19:55
Reported version
3.0
Type
Functional
Frequency
Once
Severity
S4 - Minor
Reproducibility
Always
Status
closed
Regression
No
Workaround
No
Project

Create a new score, and select some notes:

selected-in-master.PNG

Then create parts. The resulting part will undesirably display those selected notes in blue:

selected-in-part.PNG

They look like they're selected in the newly created part, cause they're blue, but they aren't really selected, which causes confusion. They will remain blue until selecting them and un-selecting them.

Happens in 3.0 release as well as 2.3.2


Comments

Title selecting notes prior to creating part will remain displayed in blue in created part creating part while element are selected will undesirably set the SELECTED flag for those cloned elements even though the part scores won't have a selection

I'm noting that this happens for all elements that can be selected prior to creating a part. And I'm noting that the reason why the cloned elements appear blue is because their SELECTED flag is actually (undesirably) set.

Status active PR created

After much thought about desired behavior, I came to conclusion that a cloned element should not inherit the original element's SELECTED flag, since the cloned elements won't be part of a selection:

https://github.com/musescore/MuseScore/pull/4590

I do wonder if this is the best way to go about this or if there are any unintended side effects, but I can't think of any...can anyone think of any?

Status PR created fixed

Fixed in branch master, commit 3cfc174c66

_fix #281441 unset selected flag in clones

Previously, if had elements selected prior to creating a part, they would maintain their SELECTED flag in the generated score, even though the new part scores won't actually have anything acutally selected. They would thus appear blue as if they were part of a selection even though they weren't.

It seems to me that the SELECTED flag shouldn't be kept when cloning elements, because cloned elements aren't added to a selection. So I'm unsetting the SELECTED flag whenever cloning an element, incase the original element was selected._