void MWindow::clear_entry()
{
undo->update_undo_before();
- clear(1);
+ clear(1, 1);
edl->optimize();
save_backup();
send_command(CURRENT_FRAME, CHANGE_EDL, edl, 1);
}
-void MWindow::clear(int clear_handle)
+void MWindow::clear(int clear_handle, int deglitch)
{
double start = edl->local_session->get_selectionstart();
double end = edl->local_session->get_selectionend();
edl->session->plugins_follow_edits,
edl->session->autos_follow_edits);
}
+
+// always needed by paste operations
+ if(deglitch)
+ {
+ edl->deglitch(start);
+ }
}
void MWindow::set_automation_mode(int mode)
edl->session->labels_follow_edits,
edl->session->plugins_follow_edits,
edl->session->autos_follow_edits);
+ edl->deglitch(start);
edl->optimize();
if( (session->drag_handle == 1 && edit_mode != MOVE_NO_EDITS) ||
(session->drag_handle == 0 && edit_mode == MOVE_ONE_EDIT) ) {
+//printf("MWindow::finish_modify_handles %d\n", __LINE__);
edl->local_session->set_selectionstart(session->drag_position);
edl->local_session->set_selectionend(session->drag_position);
+ edl->deglitch(session->drag_position);
}
else
if( edit_mode != MOVE_NO_EDITS ) {
+//printf("MWindow::finish_modify_handles %d\n", __LINE__);
edl->local_session->set_selectionstart(session->drag_start);
edl->local_session->set_selectionend(session->drag_start);
+ edl->deglitch(session->drag_start);
}
+// clamp the selection to 0
if( edl->local_session->get_selectionstart(1) < 0 ) {
edl->local_session->set_selectionstart(0);
edl->local_session->set_selectionend(0);
edl->paste_silence(start, end, 0,
edl->session->plugins_follow_edits,
edl->session->autos_follow_edits);
+ edl->deglitch(start);
+ edl->deglitch(end);
+
+
save_backup();
undo->update_undo_after(_("mute"), LOAD_EDITS);
int edit_plugins,
int edit_autos)
{
- clear(0);
+ clear(0, 1);
// Want to insert with assets shared with the master EDL.
insert(start, file,
gui->from_clipboard(string, len, BC_PRIMARY_SELECTION);
FileXML file;
file.read_from_string(string);
- clear(0);
+ clear(0, 1);
insert(start, &file,
edl->session->labels_follow_edits,
edl->session->labels_follow_edits,
edl->session->plugins_follow_edits,
edl->session->autos_follow_edits);
+ edl->deglitch(start);
+ edl->deglitch(end);
edl->optimize();
save_backup();
undo->update_undo_after(_("silence"), LOAD_EDITS | LOAD_TIMEBAR);
edl->update_assets(new_edl);
int cur_x, cur_y;
- gui->get_abs_cursor_xy(cur_x, cur_y, 0);
+ gui->get_abs_cursor(cur_x, cur_y, 0);
gui->unlock_window();
awindow->clip_edit->create_clip(new_edl, cur_x, cur_y);
edl->session->labels_follow_edits,
edl->session->plugins_follow_edits,
edl->session->autos_follow_edits);
+ edl->deglitch(0);
+ edl->deglitch(edl->local_session->get_selectionend() -
+ edl->local_session->get_selectionstart());
+
save_backup();
undo->update_undo_after(_("trim selection"), LOAD_EDITS | LOAD_TIMEBAR);