Add a config option to control region selection after split.

Add a configuration variable to choose the behaviour of the region
selection after splitting selected regions.

Add options to choose between all eight possible combinations of 'existing
unmodified selected regions', 'newly-created regions to left of split',
and 'newly-created regions to right of split', but comment out all but the
three least crazy ones for now. If anyone wants them, they're there.
This commit is contained in:
Colin Fletcher 2014-11-18 13:52:42 +00:00
parent f4e0fec179
commit d4a3141927
4 changed files with 59 additions and 0 deletions

View file

@ -1719,6 +1719,25 @@ RCOptionEditor::RCOptionEditor ()
sigc::mem_fun (*_rc_config, &RCConfiguration::set_autoscroll_editor)
));
ComboOption<RegionSelectionAfterSplit> *rsas = new ComboOption<RegionSelectionAfterSplit> (
"region-selection-after-split",
_("After splitting selected regions, select"),
sigc::mem_fun (*_rc_config, &RCConfiguration::get_region_selection_after_split),
sigc::mem_fun (*_rc_config, &RCConfiguration::set_region_selection_after_split));
// TODO: decide which of these modes are really useful
rsas->add(None, _("no regions"));
// rsas->add(NewlyCreatedLeft, _("newly-created regions before the split"));
// rsas->add(NewlyCreatedRight, _("newly-created regions after the split"));
rsas->add(NewlyCreatedBoth, _("newly-created regions"));
// rsas->add(Existing, _("unmodified regions in the existing selection"));
// rsas->add(ExistingNewlyCreatedLeft, _("existing selection and newly-created regions before the split"));
// rsas->add(ExistingNewlyCreatedRight, _("existing selection and newly-created regions after the split"));
rsas->add(ExistingNewlyCreatedBoth, _("existing selection and newly-created regions"));
add_option (_("Editor"), rsas);
/* AUDIO */
add_option (_("Audio"), new OptionEditorHeading (_("Buffering")));