Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix regroup rhythms not maintaining selection #25661

Conversation

AxelMatstoms
Copy link
Contributor

Resolves: #24955

cmdResetNoteAndRestGroupings already saved the current selection before actually regrouping rhythms. This commit updates the method to set the selection to the values saved in the case that the user had selected a range before calling regroup rhythms.

Also adds test to verify that selection is maintained when regrouping rhythms.

  • I signed the CLA
  • The title of the PR describes the problem it addresses
  • Each commit's message describes its purpose and effects, and references the issue it resolves
  • If changes are extensive, there is a sequence of easily reviewable commits
  • The code in the PR follows the coding rules
  • There are no unnecessary changes
  • The code compiles and runs on my machine, preferably after each commit individually
  • I created a unit test or vtest to verify the changes I made (if applicable)

@AxelMatstoms AxelMatstoms force-pushed the regroup-rhythms-maintain-selection branch from ac0541b to 1f9f0ed Compare November 27, 2024 07:23
Copy link
Contributor

@mathesoncalum mathesoncalum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good - thanks @AxelMatstoms! I've left a couple of comments.

src/engraving/dom/cmd.cpp Outdated Show resolved Hide resolved
@AxelMatstoms AxelMatstoms force-pushed the regroup-rhythms-maintain-selection branch from 1f9f0ed to 8aec1b7 Compare December 5, 2024 12:52
Fixes: musescore#24955

cmdResetNoteAndRestGroupings already saved the current selection before
actually regrouping rhythms. This commit updates the method to set the
selection to the values saved in the case that the user had selected a
range before calling regroup rhythms.

Also adds test to verify that selection is maintained when regrouping
rhythms.
@AxelMatstoms AxelMatstoms force-pushed the regroup-rhythms-maintain-selection branch from 8aec1b7 to 84036ca Compare December 5, 2024 13:38
@zacjansheski
Copy link
Contributor

Tested on MacOS 14, Windows 11, Ubuntu 22.04.3. Approved
#24955 FIXED

@RomanPudashkin RomanPudashkin merged commit 04e12cc into musescore:master Dec 11, 2024
11 checks passed
@AxelMatstoms AxelMatstoms deleted the regroup-rhythms-maintain-selection branch December 11, 2024 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants