TimelinePane *pane = gui->get_focused_pane();
if(edl->local_session->get_selectionend(1) >=
(double)edl->local_session->view_start[pane->number] *
- edl->local_session->zoom_sample /
- edl->session->sample_rate +
+ edl->local_session->zoom_sample / edl->session->sample_rate +
pane->canvas->time_visible() ||
edl->local_session->get_selectionend(1) < (double)edl->local_session->view_start[pane->number] *
- edl->local_session->zoom_sample /
- edl->session->sample_rate)
- {
+ edl->local_session->zoom_sample / edl->session->sample_rate) {
samplemovement((int64_t)(edl->local_session->get_selectionend(1) *
edl->session->sample_rate /
edl->local_session->zoom_sample -
update_plugin_guis();
TimelinePane *pane = gui->get_focused_pane();
if(edl->local_session->get_selectionstart(1) >= edl->local_session->view_start[pane->number] *
- edl->local_session->zoom_sample /
- edl->session->sample_rate +
- pane->canvas->time_visible()
- ||
+ edl->local_session->zoom_sample / edl->session->sample_rate +
+ pane->canvas->time_visible() ||
edl->local_session->get_selectionstart(1) < edl->local_session->view_start[pane->number] *
- edl->local_session->zoom_sample /
- edl->session->sample_rate)
- {
+ edl->local_session->zoom_sample / edl->session->sample_rate ) {
samplemovement((int64_t)(edl->local_session->get_selectionstart(1) *
edl->session->sample_rate /
edl->local_session->zoom_sample -
}
-
-
-
-
int MWindow::next_edit_handle(int shift_down)
{
double position = edl->local_session->get_selectionend(1);
- Units::fix_double(&position);
- double new_position = INFINITY;
-// Test for edit handles after cursor position
- for (Track *track = edl->tracks->first; track; track = track->next)
- {
- if (track->record)
- {
- for (Edit *edit = track->edits->first; edit; edit = edit->next)
- {
- double edit_end = track->from_units(edit->startproject + edit->length);
- Units::fix_double(&edit_end);
- if (edit_end > position && edit_end < new_position)
- new_position = edit_end;
- }
- }
- }
-
- if(new_position != INFINITY)
- {
-
+ double new_position = edl->next_edit(position);
+ if( new_position < edl->tracks->total_length() ) {
edl->local_session->set_selectionend(new_position);
//printf("MWindow::next_edit_handle %d\n", shift_down);
if(!shift_down)
int MWindow::prev_edit_handle(int shift_down)
{
double position = edl->local_session->get_selectionstart(1);
- double new_position = -1;
- Units::fix_double(&position);
-// Test for edit handles before cursor position
- for (Track *track = edl->tracks->first; track; track = track->next)
- {
- if (track->record)
- {
- for (Edit *edit = track->edits->first; edit; edit = edit->next)
- {
- double edit_end = track->from_units(edit->startproject);
- Units::fix_double(&edit_end);
- if (edit_end < position && edit_end > new_position)
- new_position = edit_end;
- }
- }
- }
-
- if(new_position != -1)
- {
+ double new_position = edl->prev_edit(position);
+ if(new_position != -1) {
edl->local_session->set_selectionstart(new_position);
//printf("MWindow::next_edit_handle %d\n", shift_down);
if(!shift_down)
gui->mainmenu->update_toggles(0);
gui->update_pane_dividers();
gui->update_cursor();
+ gui->draw_samplemovement();
// required to get new widgets to appear
gui->show_window();
gui->mainmenu->update_toggles(0);
gui->update_pane_dividers();
gui->update_cursor();
+ gui->draw_trackmovement();
// required to get new widgets to appear
gui->show_window();
gui->resource_thread->start_draw();