Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #321716: Fix entering 8th notes in REALTIME MIDI input modes
When comparing a Fraction (ticks2measureEnd) to the TDuration of the note being entered (is.duration()), the Fraction is implicitly converted by the TDuration(const Fraction&) ctor. Because of extra logic in TDuration, this can trigger a Q_ASSERT and crash Musescore in case the remaining Fraction cannot be exactly converted into a proper TDuration. In this case, this point is reached when ticks2measureEnd = 5/8 and is.duration() = 1/8. Since what we really want here is to compare the Fraction to the exact note duration (and not the other way around), we can just do an exact comparison between is.duration().fraction() and ticks2measureEnd to achieve the same goal. Integration of PR musescore#9593
- Loading branch information