"Reset Beam Mode" work on all staves of the selected measures, not just the selected ones

• Mar 2, 2016 - 18:40
Type
Functional
Severity
S4 - Minor
Status
closed
Project

See https://musescore.org/en/node/100466

...libmscore/cmd.cpp, line 1708 loops thru all staves and voices in the selected measures.

Changing that
for (int track = 0; track < nstaves() * VOICES; ++track) {
to
for (int track = selection().staffStart() * VOICES; track < selection().staffEnd() * VOICES; ++track) {
might fix this, it certainly does for me.

I'm just not sure whether the current behavior is intended? I can't imagine why though...


Comments

Also the commend currently does nothing if nothing is selected, IMHO in that case it should just work on the entire score, just like the "reset stretch" does too

I think it would be better policy to have "Reset Beam Mode" disabled if nothing is selected.

This seems like a good opportunity to ask: what does "Reset Beam Mode" do, exactly? I always thought it was the same as the "Auto" item in the Beam Properties palette. But as I discovered at https://musescore.org/en/node/99761#comment-445791, they sometimes do different things. So, what is the difference? Why does "Reset Beam Mode" use the word "mode"? And why isn't it available from the Beam Properties palette?

It is Auto for Chords and None for Rests. And working on the entire score is consistent with "Reset Strech" directly above in the same menu and also with Transpose (via shortcut)

Ah, I see. I may want to file a bug report for "Auto" adding beams to rests that weren't there before (basically requesting that it do the same thing as "Reset Beam Mode," which leads to some minor UI questions as well).

If you think it's better to apply to everything if nothing is selected than to gray out the command if nothing is selected, then "Reset Beam Mode" is not the only one that needs its behavior changed. There's also just plain "Reset" (which I still think should be called "Reset Position and Shape", but let that slide).

I am inclined to agree that "auto" should mean the same as "none" for rests, but I do worry about the effect this would have on existing scores. And there might be some reason that isn't immediately obvious why it is the way it is.

Status (old) patch (code needs review) fixed

Fixed in branch master, commit 95f7707616

fix #100481: "Reset Beam Mode" on selection, or entire score

if no selection is given. Also optimize the outer loop of that function
to start with the 1st selected segment rather than the 1st segment of
the score.

Fixed in branch 2.0.3, commit 53efaa7923

fix #100481: "Reset Beam Mode" on selection, or entire score

if no selection is given. Also optimize the outer loop of that function
to start with the 1st selected segment rather than the 1st segment of
the score.

Hmm, the 'reset everything to its defaults', doing so on the entire score when nothing is selected, without asking and with a shortcut assigned by default (Ctrl+R)? IHMO that is way to dangarous.

It would at least need to ask "Nothing selected, do you want to reset everything to the Defaults?", similar to the transpose dialog

So what about simply disabling it (i.e., making it appear gray in the menu) if nothing is selected? (I feel the same way about Reset Stretch, as it happens, and for consistency's sake I would rather have had all three of them disabled when nothing is selected, but your opinion justly carries more weight.)

I second disabling if no selection (make it appear grey). Same with Reset Stretch.

But to make sure user isn't confused as to why their command is greyyed out, I would suggest if mouse hovers over the grey button for a second, that it display something like "must select notes in order to utilize [this function]".

That makes it a less cheap fix and we might as well go for the transpose dialog approach and ask whether to apply to the entire score.

There is a difference between Reset on one hand and Reset Stretch and Reset Beams on the other hand, the former works on every selection, range or list, the latter 2 only on a range selection.