Skip to content

Commit

Permalink
fix build and compiler warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Jojo-Schmitz committed Sep 2, 2020
1 parent c68b6a4 commit 6193bcd
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 15 deletions.
31 changes: 17 additions & 14 deletions libmscore/realizedharmony.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,20 +262,23 @@ Fraction RealizedHarmony::getActualDuration(HDuration durationType) const
return _harmony->ticksTilNext(true);
break;
case HDuration::SEGMENT_DURATION:
Segment* s = _harmony->getParentSeg();
if (s) {
// TODO - use duration of chordrest on this segment / track
// currently, this will result in too short of a duration
// if there are shorter notes on other staves
// but, we can only do this up to the next harmony that is being realized,
// or elese we would get overlap
// (e.g., if the notes are dotted half / quarter, but chords are half / half,
// then we can't actually make the first chord a dotted half)
return s->ticks();
} else {
return Fraction(0, 1);
}
break;
{
Segment* s = _harmony->getParentSeg();
if (s) {
// TODO - use duration of chordrest on this segment / track
// currently, this will result in too short of a duration
// if there are shorter notes on other staves
// but, we can only do this up to the next harmony that is being realized,
// or elese we would get overlap
// (e.g., if the notes are dotted half / quarter, but chords are half / half,
// then we can't actually make the first chord a dotted half)
return s->ticks();
}
else {
return Fraction(0, 1);
}
}
break;
default:
return Fraction(0, 1);
}
Expand Down
4 changes: 3 additions & 1 deletion mu4/palette/internal/widgets/timedialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ void TimeDialog::save()

void TimeDialog::zChanged(int val)
{
Q_UNUSED(val);
Fraction sig(zNominal->value(), denominator());
groups->setSig(sig, Groups::endings(sig), zText->text(), nText->text());
}
Expand All @@ -138,8 +139,9 @@ void TimeDialog::zChanged(int val)
// nChanged
//---------------------------------------------------------

void TimeDialog::nChanged(int /*val*/)
void TimeDialog::nChanged(int val)
{
Q_UNUSED(val);
Fraction sig(zNominal->value(), denominator());
groups->setSig(sig, Groups::endings(sig), zText->text(), nText->text());
}
Expand Down

0 comments on commit 6193bcd

Please sign in to comment.