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(time signatures): adding a time signature does not deselect current measure(s) #24891

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

brobrobrob
Copy link

@brobrobrob brobrobrob commented Sep 23, 2024

Resolves: #9584

  • More descriptive variable nomenclature
  • 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)

@brobrobrob brobrobrob changed the base branch from master to 4.3.1 September 23, 2024 13:47
@brobrobrob brobrobrob closed this Sep 23, 2024
@brobrobrob brobrobrob deleted the bugfix-select-timesig-on-add-timesig branch September 23, 2024 13:56
@brobrobrob brobrobrob restored the bugfix-select-timesig-on-add-timesig branch September 23, 2024 14:05
@brobrobrob brobrobrob reopened this Sep 23, 2024
@brobrobrob brobrobrob changed the base branch from 4.3.1 to master September 23, 2024 14:32
@Jojo-Schmitz
Copy link
Contributor

Jojo-Schmitz commented Sep 23, 2024

Isn't this a duplicate of #24892 (or vice versa)?

@brobrobrob
Copy link
Author

Isn't this a duplicate of #24892 (or vice versa)?

Yes, this is the correct one because it merges into master

}
}
std::pair<staff_idx_t, staff_idx_t> staffIdxRange = getStaffIdxRange(score);
for (staff_idx_t si = staffIdxRange.first; si < staffIdxRange.second; ++si) {
TimeSig* nsig = toTimeSig(seg->element(si * VOICES));
if (!nsig) {
TimeSig* newSig = toTimeSig(seg->element(si * VOICES));
Copy link
Contributor

@Jojo-Schmitz Jojo-Schmitz Sep 23, 2024

Choose a reason for hiding this comment

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

better newTimeSig to differentiate from key signatures

Fraction ns = ts->sig();
Fraction tick = fm->tick();
TimeSig* lts = staff(staffIdx)->timeSig(tick);
Fraction newSigFraction = timeSig->sig();
Copy link
Contributor

@Jojo-Schmitz Jojo-Schmitz Sep 23, 2024

Choose a reason for hiding this comment

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

Better newTimeSigFraction

Copy link
Contributor

@Jojo-Schmitz Jojo-Schmitz Sep 23, 2024

Choose a reason for hiding this comment

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

also loose the extra space, unless using them for alignment

@brobrobrob
Copy link
Author

brobrobrob commented Sep 23, 2024

This is a draft btw, you don't have to review now! I thought the convention was to mark as 'ready for review' when I am ready for review @Jojo-Schmitz

mf->undoChangeProperty(Pid::TIMESIG_NOMINAL, newSigFraction);
Measure* currentMeasure = mf->nextMeasure();
Segment* segment = currentMeasure->findSegment(SegmentType::TimeSig, currentMeasure->tick());
mf = segment ? 0 : mf->nextMeasure();
Copy link
Author

Choose a reason for hiding this comment

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

@Jojo-Schmitz Any idea what this 'mf' is supposed to refer to?

Copy link
Contributor

Choose a reason for hiding this comment

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

To do with steming from master score I guess?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants