stop using ripple callback API, add Editor::should_ripple() and Editor::do_ripple() to manage rippling

This commit is contained in:
Paul Davis 2021-06-02 16:34:13 -06:00
parent a2b3e31e10
commit 636f1331e8
7 changed files with 119 additions and 66 deletions

View file

@ -1059,11 +1059,13 @@ Editor::finish_bringing_in_material (boost::shared_ptr<Region> region,
playlist->clear_changes ();
playlist->clear_owned_changes ();
playlist->add_region (copy, pos);
if (Config->get_edit_mode() == Ripple) {
playlist->ripple (pos, copy->length(), copy, ripple_callback (true));
if (should_ripple()) {
do_ripple (playlist, pos, copy->length(), copy, true);
} else {
playlist->rdiff_and_add_command (_session);
}
playlist->rdiff_and_add_command (_session);
break;
}