diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index de78a0c8ff..11db3b4006 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -2715,7 +2715,26 @@ Editor::cut_copy_section (bool copy) if (!get_selection_extents (start, end) || !_session) { return; } - _session->cut_copy_section (start, end, get_preferred_edit_position(), copy); + timepos_t to (get_preferred_edit_position ()); + _session->cut_copy_section (start, end, to, copy); + + timepos_t to_end (to + start.distance (end)); + + switch (UIConfiguration::instance().get_after_section_op ()) { + case SectionSelectNoop: + return; + case SectionSelectClear: + selection->clear (); + break; + case SectionSelectRetainAndMovePlayhead: + _session->request_locate (copy ? to_end.samples (): to.samples ()); + /* fallthough */ + case SectionSelectRetain: + if (!copy || to < end) { + selection->set (to, to_end); + } + break; + } } /* BUILT-IN EFFECTS */ diff --git a/gtk2_ardour/ui_config_vars.h b/gtk2_ardour/ui_config_vars.h index 8013bdccc5..768033d9bc 100644 --- a/gtk2_ardour/ui_config_vars.h +++ b/gtk2_ardour/ui_config_vars.h @@ -83,6 +83,7 @@ UI_CONFIG_VARIABLE (ARDOUR::ClockDeltaMode, secondary_clock_delta_mode, "seconda UI_CONFIG_VARIABLE (ARDOUR::samplecnt_t, clock_display_limit, "clock-display-limit", 359999) /* seconds; default 99h, 0 = unlimited */ UI_CONFIG_VARIABLE (bool, show_track_meters, "show-track-meters", true) UI_CONFIG_VARIABLE (bool, follow_edits, "follow-edits", false) +UI_CONFIG_VARIABLE (ARDOUR::TimeSelectionAfterSectionPaste, after_section_op, "after-section-op", ARDOUR::SectionSelectRetainAndMovePlayhead) UI_CONFIG_VARIABLE (bool, super_rapid_clock_update, "super-rapid-clock-update", false) UI_CONFIG_VARIABLE (bool, autoscroll_editor, "autoscroll-editor", true) UI_CONFIG_VARIABLE (bool, link_region_and_track_selection, "link-region-and-track-selection", false) // DEPRECATED