void EditPanel::prev_label()
{
int shift_down = subwindow->shift_down();
+ int snap = subwindow->ctrl_down() && subwindow->alt_down();
+
int have_mwindow_lock = mwindow->gui->get_window_lock();
int have_subwindow_lock =
subwindow->get_top_level() == mwindow->gui->get_top_level() ?
mwindow->gui->lock_window("EditPanel::prev_label 2");
- mwindow->prev_label(shift_down);
+ if( snap )
+ mwindow->snap_left_label();
+ else
+ mwindow->prev_label(shift_down);
if(!have_mwindow_lock)
mwindow->gui->unlock_window();
void EditPanel::next_label()
{
int shift_down = subwindow->shift_down();
+ int snap = subwindow->ctrl_down() && subwindow->alt_down();
+
int have_mwindow_lock = mwindow->gui->get_window_lock();
int have_subwindow_lock =
subwindow->get_top_level() == mwindow->gui->get_top_level() ?
mwindow->gui->lock_window("EditPanel::next_label 2");
- mwindow->next_label(shift_down);
+ if( snap )
+ mwindow->snap_right_label();
+ else
+ mwindow->next_label(shift_down);
if(!have_mwindow_lock)
mwindow->gui->unlock_window();
void EditPanel::prev_edit()
{
int shift_down = subwindow->shift_down();
+ int snap = subwindow->ctrl_down() && subwindow->alt_down();
+
int have_mwindow_lock = mwindow->gui->get_window_lock();
int have_subwindow_lock =
subwindow->get_top_level() == mwindow->gui->get_top_level() ?
mwindow->gui->lock_window("EditPanel::prev_edit 2");
- mwindow->prev_edit_handle(shift_down);
+ if( snap )
+ mwindow->snap_left_edit();
+ else
+ mwindow->prev_edit_handle(shift_down);
if(!have_mwindow_lock)
mwindow->gui->unlock_window();
void EditPanel::next_edit()
{
int shift_down = subwindow->shift_down();
+ int snap = subwindow->ctrl_down() && subwindow->alt_down();
+
int have_mwindow_lock = mwindow->gui->get_window_lock();
int have_subwindow_lock =
subwindow->get_top_level() == mwindow->gui->get_top_level() ?
mwindow->gui->lock_window("EditPanel::next_edit 2");
- mwindow->next_edit_handle(shift_down);
+ if( snap )
+ mwindow->snap_right_edit();
+ else
+ mwindow->next_edit_handle(shift_down);
if(!have_mwindow_lock)
mwindow->gui->unlock_window();
double EditPanel::get_position()
{
EDL *edl = mwindow->edl;
- return !edl ? 0 :
- edl->local_session->get_selectionstart(1) +
- edl->session->get_frame_offset() / edl->session->frame_rate;
+ return !edl ? 0 : edl->local_session->get_selectionstart(1);
}
void EditPanel::set_position(double position)
EDL *edl = mwindow->edl;
if( !edl ) return;
if( position != get_position() ) {
- position -= edl->session->get_frame_offset() / edl->session->frame_rate;
if( position < 0 ) position = 0;
edl->local_session->set_selectionstart(position);
edl->local_session->set_selectionend(position);
}
int EditNextLabel::keypress_event()
{
- if(get_keypress() == RIGHT && ctrl_down())
+ if( ctrl_down() && get_keypress() == (!alt_down() ? RIGHT : '>') )
return handle_event();
return 0;
}
}
int EditPrevLabel::keypress_event()
{
- if(get_keypress() == LEFT && ctrl_down())
+ if( ctrl_down() && get_keypress() == (!alt_down() ? LEFT : '<') )
return handle_event();
return 0;
}
}
int EditNextEdit::keypress_event()
{
- if(get_keypress() == RIGHT && alt_down())
+ if( alt_down() && get_keypress() == (!ctrl_down() ? RIGHT : '.') )
return handle_event();
return 0;
}
}
int EditPrevEdit::keypress_event()
{
- if(get_keypress() == LEFT && alt_down())
+ if( alt_down() && get_keypress() == (!ctrl_down() ? LEFT : ',') )
return handle_event();
return 0;
}
int EditToClip::keypress_event()
{
- if(get_keypress() == 'i')
+ if(get_keypress() == 'i' && !alt_down())
{
handle_event();
return 1;
}
int EditLabelbutton::keypress_event()
{
- if(get_keypress() == 'l')
+ if(get_keypress() == 'l' && !alt_down())
return handle_event();
return 0;
}