- if (use_snap && _editor->snap_type() == SnapToBar) {
- map.round_bbt (bbt, -1, (frame > _real_section->frame()) ? RoundUpMaybe : RoundDownMaybe);
- } else if (use_snap) {
- map.round_bbt (bbt, _editor->get_grid_beat_divisions (0), RoundNearest);
- }
- double const pulse = map.predict_tempo_position (_real_section, bbt).first;
- _real_section = map.add_tempo (_marker->tempo(), pulse, 0, _real_section->type(), MusicTime);
+ _real_section = map.add_tempo (_marker->tempo(), map.pulse_at_frame (frame), 0, _real_section->type(), MusicTime);