Check meter/tempo section exists in copy drag.
This commit is contained in:
parent
180445c18c
commit
39b70ceced
@ -3189,6 +3189,10 @@ MeterMarkerDrag::motion (GdkEvent* event, bool first_move)
|
||||
const double beat = map.beat_at_bbt (bbt);
|
||||
_real_section = map.add_meter (Meter (_marker->meter().divisions_per_bar(), _marker->meter().note_divisor())
|
||||
, beat, bbt, map.frame_at_bbt (bbt), _real_section->position_lock_style());
|
||||
if (!_real_section) {
|
||||
aborted (true);
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
/* only snap to bars. leave snap mode alone for audio locked meters.*/
|
||||
@ -3329,6 +3333,11 @@ TempoMarkerDrag::motion (GdkEvent* event, bool first_move)
|
||||
} else {
|
||||
_real_section = map.add_tempo (_marker->tempo(), 0.0, frame, _real_section->type(), AudioTime);
|
||||
}
|
||||
|
||||
if (!_real_section) {
|
||||
aborted (true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user