Skip to content

Commit

Permalink
Tempo: Display Error Messages
Browse files Browse the repository at this point in the history
  • Loading branch information
daksh4469 authored and meganindya committed Feb 5, 2021
1 parent a5904b7 commit 35fe116
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions js/widgets/tempo.js
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ class Tempo {
this.BPMs[i] = parseFloat(this.BPMs[i]) + Math.round(0.1 * this.BPMs[i]);

if (this.BPMs[i] > 1000) {
logo.errorMsg(_("The beats per minute must be below 1000."));
this.BPMs[i] = 1000;
}

Expand All @@ -290,6 +291,7 @@ class Tempo {
slowDown(i) {
this.BPMs[i] = parseFloat(this.BPMs[i]) - Math.round(0.1 * this.BPMs[i]);
if (this.BPMs[i] < 30) {
logo.errorMsg(_("The beats per minute must be above 30"));
this.BPMs[i] = 30;
}

Expand Down

0 comments on commit 35fe116

Please sign in to comment.