summaryrefslogtreecommitdiff
path: root/muse2/muse
diff options
context:
space:
mode:
authorFlorian Jung <flo@windfisch.org>2011-05-11 13:28:42 +0000
committerFlorian Jung <flo@windfisch.org>2011-05-11 13:28:42 +0000
commit9de70ebf672b450c1e7d91adc0bdb96f6dc2c4de (patch)
tree9b92b4087cc0660b191483f7e5d0ee430a5a47f1 /muse2/muse
parent67a3e8f501f9df2646bfe6ad7aa3b08246e8f7ce (diff)
fixed endless-loop-bug by limiting note.pitch to 0..127 (i.e., valid ranges)
Diffstat (limited to 'muse2/muse')
-rw-r--r--muse2/muse/midiedit/scoreedit.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/muse2/muse/midiedit/scoreedit.cpp b/muse2/muse/midiedit/scoreedit.cpp
index a75c5b5b..65559efb 100644
--- a/muse2/muse/midiedit/scoreedit.cpp
+++ b/muse2/muse/midiedit/scoreedit.cpp
@@ -3513,7 +3513,10 @@ void ScoreCanvas::mouseMoveEvent (QMouseEvent* event)
case PITCH:
if (debugMsg) cout << "changing pitch, delta="<<nearbyint((float)dy/PITCH_DELTA)<<endl;
new_pitch=dragged_event_original_pitch - nearbyint((float)dy/PITCH_DELTA);
-
+
+ if (new_pitch < 0) new_pitch=0;
+ if (new_pitch > 127) new_pitch=127;
+
if (dragged_event.pitch()!=new_pitch)
{
if (!undo_started)
@@ -4056,7 +4059,6 @@ void staff_t::apply_lasso(QRect rect, set<Event*>& already_processed)
/* BUGS and potential bugs
- * o notes must not be moved to pitches <0 or >127
* o when the keymap is not used, this will probably lead to a bug
* same when mastertrack is disabled
* o tied notes don't work properly when there's a key-change in