remove some cruft with previous commits. remove option link-region-and-track-selection since they are now exclusive, and rename select-all-regions to select-all-objects to match the implementation

This commit is contained in:
Ben Loftis 2014-07-06 13:53:56 -05:00
parent 40d377c288
commit 6d97d72999
10 changed files with 12 additions and 73 deletions

View File

@ -297,9 +297,6 @@
<menu action="LatchMenu">
<menuitem action='LatchedSolo'/>
</menu>
<menu action="Link">
<menuitem action='link-region-and-track-selection'/>
</menu>
<menu action='ZoomFocusMenu'>
<menuitem action='zoom-focus-playhead'/>
<menuitem action='zoom-focus-edit'/>

View File

@ -154,7 +154,7 @@
<menuitem action='editor-paste'/>
<separator/>
<menu action="SelectMenu">
<menuitem action='select-all-regions'/>
<menuitem action='select-all-objects'/>
<menuitem action='select-all-tracks'/>
<menuitem action='deselect-all'/>
<menuitem action='invert-selection'/>

View File

@ -1836,7 +1836,7 @@ Editor::add_dstream_context_items (Menu_Helpers::MenuList& edit_items)
select_menu->set_name ("ArdourContextMenu");
select_items.push_back (MenuElem (_("Select All in Track"), sigc::bind (sigc::mem_fun(*this, &Editor::select_all_in_track), Selection::Set)));
select_items.push_back (MenuElem (_("Select All Regions"), sigc::bind (sigc::mem_fun(*this, &Editor::select_all_regions), Selection::Set)));
select_items.push_back (MenuElem (_("Select All Objects"), sigc::bind (sigc::mem_fun(*this, &Editor::select_all_objects), Selection::Set)));
select_items.push_back (MenuElem (_("Invert Selection in Track"), sigc::mem_fun(*this, &Editor::invert_selection_in_track)));
select_items.push_back (MenuElem (_("Invert Selection"), sigc::mem_fun(*this, &Editor::invert_selection)));
select_items.push_back (SeparatorElem());
@ -1913,7 +1913,7 @@ Editor::add_bus_context_items (Menu_Helpers::MenuList& edit_items)
select_menu->set_name ("ArdourContextMenu");
select_items.push_back (MenuElem (_("Select All in Track"), sigc::bind (sigc::mem_fun(*this, &Editor::select_all_in_track), Selection::Set)));
select_items.push_back (MenuElem (_("Select All Regions"), sigc::bind (sigc::mem_fun(*this, &Editor::select_all_regions), Selection::Set)));
select_items.push_back (MenuElem (_("Select All Objects"), sigc::bind (sigc::mem_fun(*this, &Editor::select_all_objects), Selection::Set)));
select_items.push_back (MenuElem (_("Invert Selection in Track"), sigc::mem_fun(*this, &Editor::invert_selection_in_track)));
select_items.push_back (MenuElem (_("Invert Selection"), sigc::mem_fun(*this, &Editor::invert_selection)));
select_items.push_back (SeparatorElem());

View File

@ -251,7 +251,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
void maybe_locate_with_edit_preroll (framepos_t);
void play_with_preroll ();
void select_all_in_track (Selection::Operation op);
void select_all_regions (Selection::Operation op);
void select_all_objects (Selection::Operation op);
void invert_selection_in_track ();
void invert_selection ();
void deselect_all ();

View File

@ -191,7 +191,7 @@ Editor::register_actions ()
reg_sens (editor_actions, "playhead-to-range-start", _("Playhead to Range Start"), sigc::bind (sigc::mem_fun(*this, &Editor::cursor_to_selection_start), playhead_cursor));
reg_sens (editor_actions, "playhead-to-range-end", _("Playhead to Range End"), sigc::bind (sigc::mem_fun(*this, &Editor::cursor_to_selection_end), playhead_cursor));
reg_sens (editor_actions, "select-all-regions", _("Select All Regions"), sigc::bind (sigc::mem_fun(*this, &Editor::select_all_regions), Selection::Set));
reg_sens (editor_actions, "select-all-objects", _("Select All Objects"), sigc::bind (sigc::mem_fun(*this, &Editor::select_all_objects), Selection::Set));
reg_sens (editor_actions, "select-all-tracks", _("Select All Tracks"), sigc::mem_fun(*this, &Editor::select_all_tracks));
reg_sens (editor_actions, "deselect-all", _("Deselect All"), sigc::mem_fun(*this, &Editor::deselect_all));
reg_sens (editor_actions, "invert-selection", _("Invert Selection"), sigc::mem_fun(*this, &Editor::invert_selection));

View File

@ -1370,7 +1370,7 @@ Editor::select_all_internal_edit (Selection::Operation)
}
void
Editor::select_all_regions (Selection::Operation op)
Editor::select_all_objects (Selection::Operation op)
{
list<Selectable *> touched;

View File

@ -174,7 +174,7 @@ This mode provides many different operations on both regions and control points,
;; MIDDLE ROW
@aep|Region/align-regions-sync-relative|a|align sync points (relative)
@select|Editor/select-all-regions|<@PRIMARY@>a|select all regions
@select|Editor/select-all-objects|<@PRIMARY@>a|select all objects
@aep|Region/align-regions-end|<@SECONDARY@>a|align end(s)
@aep|Region/align-regions-sync|<@TERTIARY@>a|align sync points
@aep|Region/align-regions-start|<@PRIMARY@><@LEVEL4@>a|align start(s)

View File

@ -1548,14 +1548,6 @@ RCOptionEditor::RCOptionEditor ()
sigc::mem_fun (*ARDOUR_UI::config(), &UIConfiguration::set_draggable_playhead)
));
add_option (_("Editor"),
new BoolOption (
"link-region-and-track-selection",
_("Link selection of regions and tracks"),
sigc::mem_fun (*_rc_config, &RCConfiguration::get_link_region_and_track_selection),
sigc::mem_fun (*_rc_config, &RCConfiguration::set_link_region_and_track_selection)
));
add_option (_("Editor"),
new BoolOption (
"automation-follows-regions",

View File

@ -160,9 +160,6 @@ Selection::clear_regions ()
if (!regions.empty()) {
regions.clear_all ();
RegionsChanged();
if (Config->get_link_region_and_track_selection()) {
clear_tracks ();
}
}
}
@ -463,9 +460,6 @@ Selection::add (vector<RegionView*>& v)
for (vector<RegionView*>::iterator i = v.begin(); i != v.end(); ++i) {
if (find (regions.begin(), regions.end(), (*i)) == regions.end()) {
changed = regions.add ((*i));
if (Config->get_link_region_and_track_selection() && changed) {
add (&(*i)->get_time_axis_view());
}
}
}
@ -488,9 +482,6 @@ Selection::add (const RegionSelection& rs)
for (RegionSelection::const_iterator i = rs.begin(); i != rs.end(); ++i) {
if (find (regions.begin(), regions.end(), (*i)) == regions.end()) {
changed = regions.add ((*i));
if (Config->get_link_region_and_track_selection() && changed) {
add (&(*i)->get_time_axis_view());
}
}
}
@ -507,12 +498,9 @@ Selection::add (RegionView* r)
if (find (regions.begin(), regions.end(), r) == regions.end()) {
bool changed = regions.add (r);
if (Config->get_link_region_and_track_selection() && changed) {
add (&r->get_time_axis_view());
}
if (changed) {
RegionsChanged ();
}
if (changed) {
RegionsChanged ();
}
}
}
@ -525,11 +513,6 @@ Selection::add (MidiRegionView* mrv)
if (find (midi_regions.begin(), midi_regions.end(), mrv) == midi_regions.end()) {
midi_regions.push_back (mrv);
/* XXX should we do this? */
#if 0
if (Config->get_link_region_and_track_selection()) {
add (&mrv->get_time_axis_view());
}
#endif
MidiRegionsChanged ();
}
}
@ -720,10 +703,6 @@ Selection::remove (RegionView* r)
if (regions.remove (r)) {
RegionsChanged ();
}
if (Config->get_link_region_and_track_selection() && !regions.involves (r->get_time_axis_view())) {
remove (&r->get_time_axis_view());
}
}
void
@ -735,13 +714,6 @@ Selection::remove (MidiRegionView* mrv)
midi_regions.erase (x);
MidiRegionsChanged ();
}
#if 0
/* XXX fix this up ? */
if (Config->get_link_region_and_track_selection() && !regions.involves (r->get_time_axis_view())) {
remove (&r->get_time_axis_view());
}
#endif
}
@ -839,17 +811,11 @@ Selection::set (MidiRegionView* mrv)
}
void
Selection::set (RegionView* r, bool also_clear_tracks)
Selection::set (RegionView* r, bool /*also_clear_tracks*/)
{
clear_time(); //enforce region/object exclusivity
clear_tracks(); //enforce object/track exclusivity
clear_objects ();
if (also_clear_tracks && !Config->get_link_region_and_track_selection()) {
/* clear_regions() will have done this if the link preference
* is enabled
*/
clear_tracks ();
}
add (r);
}
@ -862,18 +828,6 @@ Selection::set (vector<RegionView*>& v)
clear_tracks(); //enforce object/track exclusivity
clear_objects();
if (Config->get_link_region_and_track_selection()) {
if (had_regions) {
/* there were regions before, so we're changing the
* region selection (likely), thus link region/track
* selection. relevant tracks will get selected
* as we ::add() below.
*/
clear_tracks ();
// make sure to deselect any automation selections
clear_points();
}
}
add (v);
}
@ -1067,10 +1021,6 @@ Selection::set (list<Selectable*> const & selectables)
clear_tracks(); //enforce object/track exclusivity
clear_objects ();
if (Config->get_link_region_and_track_selection ()) {
clear_tracks ();
}
add (selectables);
}

View File

@ -83,7 +83,7 @@ CONFIG_VARIABLE (bool, use_osc, "use-osc", false)
/* editing related */
CONFIG_VARIABLE (EditMode, edit_mode, "edit-mode", Slide)
CONFIG_VARIABLE (bool, link_region_and_track_selection, "link-region-and-track-selection", false)
CONFIG_VARIABLE (bool, link_region_and_track_selection, "link-region-and-track-selection", false) // DEPRECATED
CONFIG_VARIABLE (bool, link_editor_and_mixer_selection, "link-editor-and-mixer-selection", false)
CONFIG_VARIABLE (std::string, keyboard_layout_name, "keyboard-layout-name", "ansi")
CONFIG_VARIABLE (bool, automation_follows_regions, "automation-follows-regions", true)