- } else if (newframe > 0) {
- snap_to (next, -1, true);
- copy_location->set_start (next);
- copy_location->set_end (newframe);
+ if (move_both) {
+ copy_location->set_start (newframe);
+ copy_location->set_end (newframe + f_delta);
+ } else if (newframe < copy_location->end()) {
+ copy_location->set_start (newframe);
+ } else {
+ snap_to (next, 1, true);
+ copy_location->set_end (next);
+ copy_location->set_start (newframe);
+ }
+
+ } else { // end marker
+
+ if (move_both) {
+ copy_location->set_end (newframe);
+ copy_location->set_start (newframe - f_delta);
+ } else if (newframe > copy_location->start()) {
+ copy_location->set_end (newframe);
+
+ } else if (newframe > 0) {
+ snap_to (next, -1, true);
+ copy_location->set_start (next);
+ copy_location->set_end (newframe);
+ }