- if (prev_ts) {
- /* set the start beat */
- double beats_to_ts = prev_ts->beat_at_frame (frame - prev_ts->frame(), ts.beats_per_minute(), frame - prev_ts->frame(), _frame_rate);
- double beats = beats_to_ts + prev_ts->start();
-
- if (next_ts) {
- if (next_ts->start() < beats) {
- /* with frame-based editing, it is possible to get in a
- situation where if the tempo was placed at the mouse pointer frame,
- the following music-based tempo would jump to an earlier frame,
- changing the start beat of the moved tempo.
- in this case, we have to do some beat-based comparison TODO
- */
-
- ts.set_start (next_ts->start());
- } else if (prev_ts->start() > beats) {
- ts.set_start (prev_ts->start());
- } else {
- ts.set_start (beats);
- }
+ if (prev_ts) {
+ /* set the start beat */
+ double beats_to_ts = prev_ts->beat_at_frame (frame - prev_ts->frame(), ts.beats_per_minute(), frame - prev_ts->frame(), _frame_rate);
+ double beats = beats_to_ts + prev_ts->beat();
+
+ if (next_ts) {
+ if (next_ts->beat() < beats) {
+ /* with frame-based editing, it is possible to get in a
+ situation where if the tempo was placed at the mouse pointer frame,
+ the following music-based tempo would jump to an earlier frame,
+ changing the beat beat of the moved tempo.
+ in this case, we have to do some beat-based comparison TODO
+ */
+ } else if (prev_ts->beat() > beats) {
+ ts.set_beat (prev_ts->beat());