struct PresentationInfoTimeAxisViewSorter {
bool operator() (TimeAxisView* a, TimeAxisView* b) {
- return a->presentation_info() < b->presentation_info();
+ return a->presentation_info().order() < b->presentation_info().order();
}
};
void
TempoMarkerDrag::setup_pointer_frame_offset ()
{
- _pointer_frame_offset = raw_grab_frame() - _marker->tempo().frame();
+ _pointer_frame_offset = raw_grab_frame() - _real_section->frame();
}
void
show_verbose_cursor_text (strs.str());
} else if (_movable && !_real_section->locked_to_meter()) {
- TempoMap& map (_editor->session()->tempo_map());
- const bool was_music = _real_section->position_lock_style() == MusicTime;
-
const framepos_t pf = adjusted_current_frame (event);
+ TempoMap& map (_editor->session()->tempo_map());
- if (!_editor->snap_musical()) {
-
- if (was_music) {
- _real_section->set_position_lock_style (AudioTime);
- }
-
- map.gui_move_tempo (_real_section, pf);
-
- if (was_music) {
- _real_section->set_position_lock_style (MusicTime);
- }
-
- } else {
-
- if (!was_music) {
- _real_section->set_position_lock_style (MusicTime);
- }
-
- map.gui_move_tempo (_real_section, pf);
+ /* snap to beat is 1, snap to bar is -1 (sorry) */
+ int sub_num = _editor->get_grid_music_divisions (event->button.state);
- if (!was_music) {
- _real_section->set_position_lock_style (AudioTime);
- }
- }
+ map.gui_move_tempo (_real_section, pf, sub_num);
show_verbose_cursor_time (_real_section->frame());
}
-
- /* this has moved the bar lines themselves, so recalibrate the offset */
- setup_pointer_frame_offset();
-
_marker->set_position (adjusted_current_frame (event, false));
}