Locked score unlocks by mouse interactions

• Oct 12, 2020 - 16:07
Reported version
P3 - Low
S3 - Major
  1. Open or Create a score
  2. Lock it (Ctrl-Shift-L)
  3. Click on the first measure and type "N" to try and enter note input mode
  4. Drag the score

Expected result: dragging the score keep the score in a locked state
Actual result: the score leaves SCORE_LOCK state

As locking a score is mainly used to prevent accidental edits by the mouse, it is rather ironic that precisely such an action results in unlocking the score.

Additional request: include a menu entry (perhaps under Tools or Edit) to make (Un)locking the score discoverable.


One of the main purposes for the lock score function was in response to teachers who did not want their students to edit their homework. Making this feature more discoverable would defeat the purpose.

In reply to by mike320

Interesting angle.
The one I'm coming from (and the poster that triggered this) is where the score is distributed for the choir and the members should be protected from accidental changes due to dragging it around. But they shouldn't be prohibited to change it at all and it mustn't be too hard to discover how to "unlock" the score again if they for example wish to scale up their voice staff in comparison to the others.

How is locking a score useful (like to prevent another user in a different session to accidentally modify it), it it isn't a score property that gets saved along with the score?

STATE_LOCK yes; read what I mean, not what I type :-)

For the choir use case it should be saved into the score (although as an in between workaround we could have a plugin to open a score and lock it in a single action).

There is nothing corresponding to write to a score. It is a state, internally used by MuseScore (like edit, note-enty, play, etc), while doing certain operations, nothing that would be written to a score

Just a note that there is a different form of score locking implemented for the purpose of the score comparison tool, so make sure you can't edit the "last saved version". I briefly looked into"productizing" that (perhaps by incorporating that code into the existing lock command). First attempts were promising but there were some bugs I couldn't immediately solve, and I had too much else going on to continue. Still do, unfortunately.

Reading the original forum issue, a readonly score is requested but the best MuseScore offers is a locked score which is also far too easy to unlock ;-). The readonly score is where @Marc Sabatella is referring to?

Title Locked score unlocks by mouse interactions UI Suggestion for Score Lock Feature

In a future Musescore UI for the score lock feature, perhaps the "Mark as Final" feature in Microsoft Word might be a relevant model. Once set, the UI clearly shows the lock, but ANY user has the ability to turn off the lock and edit.

Attachment Size
MSWordProtectDocumentFeature.jpg 135.81 KB

I'm looking at implementing this in v4.
I don't intend to add any additional functionality but my assumption is that in lock mode:
a) the only way to make ANY modification to the score is to first explicitly unlock it
b) all commands that do not modify the score should still be available, including save, selection commands, copy, pan, zoom, navigation commands - the only exception would be "mode change" commands like "note entry mode"
c) click & drag in lock mode should always pan the score regardless of what you click on

That's somewhat different to what we have now where
a) you can still modify/add elements via the palette even in locked mode
b) you can modify element/staff properties via the inspector or staff properties dialog even in "locked mode"
c) click & drag auto unlocks
d) piano roll editor still allows modifying score (NB this is being implemented currently for v4)
e) various context-menu commands like "split staff", etc. are still active
f) quite a lot of non-score-modifying commands are unavailable (e.g. save, select all, page up/down etc.)

The main challenge will be still allowing the inspector/properties panel and e.g. "staff properties" dialog to be useful without allowing them to make modifications.

Pretty much agree with the fixes as proposed by Dylan.

I could probably even live with a blanked out inspector and no staff properties for a locked score if that is easier to implement than a readonly version of those things.

In reply to by jeetee

I'm hoping Qt Quick/Qml has an easy way of disabling the whole panel!

I like the idea that "lock mode" by default hides all the dockpanels that aren't useful. It could even automatically hide unprintable stuff etc., in other words it's more like a "print preview" or a "score reading" mode that's intended for performing from etc.
Either way it's not going to be trivial to do well - what MU3 has at the moment doesn't seem worth all that much, other than the beginnings of a useful concept.

In image editing one often works on multilayered images. There is an option in the layers pallet to lock individual layers to prevent accidental alteration or erasure of layers that have had a significant amount of work done on them.
Similarly I view a score with multiple instruments as a multilayered image.
As I am also in my 60's and I sometimes find that I may have accidentally clicked somewhere on the score(image) with my mouse and, not noticed, I find myself making major unintended (sometimes monumental) errors and it can be some time before I realise.
This often means closing the score without saving (too bad if I have autosave on) and redoing all those edits up to that point. Sometimes hours of work.
It would be extremely useful, once I am satisfied with all the edits for a particular staff if that staff could be locked down until I decide I need to edit it again.
The obvious location for this lock/unlock facility would be in the Instruments Panel.
There is already a tick box to make the Stave Visible/Invisible. I assume that if it is invisible individual notes can't be shifted but what happens when Ctrl+Del to remove a measure is executed?
Another tick box next to the Visible column could lock/unlock the instrument/stave/staff. The Ctrl/Del if the Staff is locked would popup error informing that a specific staff needs to be unlocked prior to removing the measure. This would also prevent accidental erasure of parts of invisible staves where one might forget that there is a perfectly good reason why some staves in a visible measure are completely empty.

Reported version 3.5 4.0

I still cannot understand that there is no real lock function to not mess up everything: accidently clicked somewhere and I'm struggling now since more than an hour to repair my work and this "set auto brakes" doesn't make it easier to work with.

Tested a lot of software products -not music related- at my job but never saw something like that. Unbelieveable.

EDIT: exit without saving isn't an option as you might discover an error after some times when you have pressed "save" many times.