now that track and region selections are mutually exclusive, you need a separate...
authorBen Loftis <ben@harrisonconsoles.com>
Sun, 6 Jul 2014 17:57:26 +0000 (12:57 -0500)
committerBen Loftis <ben@harrisonconsoles.com>
Sun, 6 Jul 2014 17:57:36 +0000 (12:57 -0500)
gtk2_ardour/ardour.menus.in
gtk2_ardour/editor.cc
gtk2_ardour/editor.h
gtk2_ardour/editor_actions.cc
gtk2_ardour/editor_ops.cc
gtk2_ardour/editor_selection.cc
gtk2_ardour/mnemonic-us.bindings.in

index ab5dbc6bab74ae528fa3dcd40996cb3e434f46a8..85383e2b02ad272569617c8437a88ef4c7d26677 100644 (file)
       <menuitem action='editor-paste'/>
       <separator/>       
       <menu action="SelectMenu">          
-        <menuitem action='select-all'/>
+        <menuitem action='select-all-regions'/>
+        <menuitem action='select-all-tracks'/>
         <menuitem action='deselect-all'/>
         <menuitem action='invert-selection'/>
         <menuitem action='select-all-after-edit-cursor'/>
index 3c8ce77a15665ff069910a154730f56d7521abf4..8a39a8fac1bb27e922db5ab8f53b961cabcb5b9c 100644 (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"), sigc::bind (sigc::mem_fun(*this, &Editor::select_all), 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 (_("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"), sigc::bind (sigc::mem_fun(*this, &Editor::select_all), 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 (_("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());
index b5533ec689098cc0ddf0b0bf3009fa5018c4661b..76006194b991f88e246a91c29fcfd52f9b5e7366 100644 (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 (Selection::Operation op);
+       void select_all_regions (Selection::Operation op);
        void invert_selection_in_track ();
        void invert_selection ();
        void deselect_all ();
index 411948248c081645d739b02e7d5bcc0006fcf8ee..96b9bc05aeb81f8d4a8273da0b386a03fa7415d9 100644 (file)
@@ -191,7 +191,8 @@ 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", _("Select All"), sigc::bind (sigc::mem_fun(*this, &Editor::select_all), Selection::Set));
+       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-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));
 
index e4d6c267e97fe1a67d81ecc52e212e1f6d0385d7..9774efb8539f82a6715a6dccd3805528b633c2de 100644 (file)
@@ -133,7 +133,7 @@ Editor::split_regions_at (framepos_t where, RegionSelection& regions)
 {
        bool frozen = false;
 
-       bool operating_on_region_selection = !selection->regions.empty();
+       RegionSelection pre_selected_regions = selection->regions;
 
        list<boost::shared_ptr<Playlist> > used_playlists;
        list<RouteTimeAxisView*> used_trackviews;
@@ -234,12 +234,10 @@ Editor::split_regions_at (framepos_t where, RegionSelection& regions)
                EditorThaw(); /* Emit Signal */
        }
 
-       //IFF we had a selected region, then we should select both sides of the new region after the split.
-       //(if there is no region selection then we are working on a range selection, so no changes to region selection are necessary)
-       if( operating_on_region_selection ) {
-               if (!latest_regionviews.empty()) {
-                       selection->add (latest_regionviews);
-               }
+       //IFF we were working on selected regions, then we should select both sides of the new region after the split.
+       if( !pre_selected_regions.empty() ) {
+               selection->add (latest_regionviews);  //these are the new regions, created after the split
+               selection->add (pre_selected_regions);  //these were the old selected regions, they got lost in the freeze/thaw
        }
 
 }
index fd9d68fe93e3fdfc2d57d1c29a794d10c6455f1d..6f65b273451b84f5dc329576c3704f7008ad9f26 100644 (file)
@@ -1370,7 +1370,7 @@ Editor::select_all_internal_edit (Selection::Operation)
 }
 
 void
-Editor::select_all (Selection::Operation op)
+Editor::select_all_regions (Selection::Operation op)
 {
        list<Selectable *> touched;
 
index 5d8ce13a9095695bce8b8b2ec81f572de8fa4a81..3f30b2065768d7227b1fd9b7636fccfe430bb6a7 100644 (file)
@@ -149,7 +149,7 @@ This mode provides many different operations on both regions and control points,
 @trans|Transport/Record|<@TERTIARY@>r|engage record
 @mmode|MouseMode/set-mouse-mode-timefx|t|timefx mode
 @rop|Region/pitch-shift-region|<@SECONDARY@>t|transpose
-@eep|Editor/insert-time|<@PRIMARY@>t|insert time
+@eep|Editor/select-all-tracks|<@PRIMARY@>t|select all tracks
 @mmode|MouseMode/set-mouse-mode-object-range|y|link object/range tools
 @edit|Editor/alternate-redo|<@PRIMARY@>y|redo
 @select|Editor/select-all-between-cursors|<@PRIMARY@>u|all enclosed by edit range
@@ -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|<@PRIMARY@>a|select everything
+@select|Editor/select-all-regions|<@PRIMARY@>a|select all regions
 @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)