Various adjustments to make more operations respect the Edit property on route groups.

git-svn-id: svn://localhost/ardour2/branches/3.0@5273 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2009-06-25 20:58:32 +00:00
parent 8e7a5d7741
commit 498afeb63e
11 changed files with 128 additions and 153 deletions

View file

@ -4485,7 +4485,7 @@ Editor::restore_editing_space ()
/** /**
* Make new playlists for a given track and also any others that belong * Make new playlists for a given track and also any others that belong
* to the same active edit group. * to the same active route group with the `edit' property.
* @param v Track. * @param v Track.
*/ */
@ -4495,13 +4495,13 @@ Editor::new_playlists (TimeAxisView* v)
begin_reversible_command (_("new playlists")); begin_reversible_command (_("new playlists"));
vector<boost::shared_ptr<ARDOUR::Playlist> > playlists; vector<boost::shared_ptr<ARDOUR::Playlist> > playlists;
session->get_playlists(playlists); session->get_playlists(playlists);
mapover_tracks ( bind(mem_fun (*this, &Editor::mapped_use_new_playlist), playlists), v ); mapover_tracks (bind (mem_fun (*this, &Editor::mapped_use_new_playlist), playlists), v, RouteGroup::Edit);
commit_reversible_command (); commit_reversible_command ();
} }
/** /**
* Use a copy of the current playlist for a given track and also any others that belong * Use a copy of the current playlist for a given track and also any others that belong
* to the same active edit group. * to the same active route group with the `edit' property.
* @param v Track. * @param v Track.
*/ */
@ -4511,13 +4511,12 @@ Editor::copy_playlists (TimeAxisView* v)
begin_reversible_command (_("copy playlists")); begin_reversible_command (_("copy playlists"));
vector<boost::shared_ptr<ARDOUR::Playlist> > playlists; vector<boost::shared_ptr<ARDOUR::Playlist> > playlists;
session->get_playlists(playlists); session->get_playlists(playlists);
mapover_tracks ( bind(mem_fun (*this, &Editor::mapped_use_copy_playlist), playlists), v ); mapover_tracks (bind (mem_fun (*this, &Editor::mapped_use_copy_playlist), playlists), v, RouteGroup::Edit);
commit_reversible_command (); commit_reversible_command ();
} }
/** /** Clear the current playlist for a given track and also any others that belong
* Clear the current playlist for a given track and also any others that belong * to the same active route group with the `edit' property.
* to the same active edit group.
* @param v Track. * @param v Track.
*/ */
@ -4527,7 +4526,7 @@ Editor::clear_playlists (TimeAxisView* v)
begin_reversible_command (_("clear playlists")); begin_reversible_command (_("clear playlists"));
vector<boost::shared_ptr<ARDOUR::Playlist> > playlists; vector<boost::shared_ptr<ARDOUR::Playlist> > playlists;
session->get_playlists(playlists); session->get_playlists(playlists);
mapover_tracks ( mem_fun (*this, &Editor::mapped_clear_playlist), v ); mapover_tracks (mem_fun (*this, &Editor::mapped_clear_playlist), v, RouteGroup::Edit);
commit_reversible_command (); commit_reversible_command ();
} }
@ -5065,42 +5064,25 @@ Editor::get_regions_after (RegionSelection& rs, nframes64_t where, const TrackSe
void void
Editor::get_regions_for_action (RegionSelection& rs, bool allow_entered) Editor::get_regions_for_action (RegionSelection& rs, bool allow_entered)
{ {
if (selection->regions.empty()) { rs = selection->regions;
/* no regions selected; get all regions at the edit point across: if (allow_entered && entered_regionview) {
- tracks in the region's route's edit group, if it has the edit property rs.add (entered_regionview);
- selected tracks }
*/
if (entered_regionview) { TrackSelection tracks = selection->tracks;
rs.add (entered_regionview); RegionSelection to_map = rs;
TrackSelection tracks = selection->tracks; for (RegionSelection::iterator i = to_map.begin (); i != to_map.end(); ++i) {
RouteGroup* g = entered_regionview->get_time_axis_view().route_group (); RouteGroup* g = (*i)->get_time_axis_view().route_group ();
if (g && g->active_property (RouteGroup::Edit)) { if (g && g->active_property (RouteGroup::Edit)) {
tracks.add (axis_views_from_routes (g->route_list())); tracks.add (axis_views_from_routes (g->route_list()));
}
nframes64_t const where = get_preferred_edit_position ();
get_regions_at (rs, where, tracks);
}
} else {
/* use the selected regions */
rs = selection->regions;
/* if the entered regionview wasn't selected and we allow this sort of thing,
then add it.
*/
if (allow_entered && entered_regionview && !selection->selected (entered_regionview)) {
rs.add (entered_regionview);
} }
nframes64_t const where = get_preferred_edit_position ();
get_regions_at (rs, where, tracks);
} }
} }

View file

@ -53,6 +53,7 @@
#include "ardour/audioregion.h" #include "ardour/audioregion.h"
#include "ardour/track.h" #include "ardour/track.h"
#include "ardour/types.h" #include "ardour/types.h"
#include "ardour/route_group.h"
#include "audio_clock.h" #include "audio_clock.h"
#include "gtk-custom-ruler.h" #include "gtk-custom-ruler.h"
@ -533,13 +534,15 @@ class Editor : public PublicEditor
void sort_track_selection (TrackSelection* sel = 0); void sort_track_selection (TrackSelection* sel = 0);
void get_relevant_tracks (std::set<RouteTimeAxisView*>& relevant_tracks); void get_relevant_tracks (std::set<RouteTimeAxisView*>& relevant_tracks) const;
void get_equivalent_regions (RegionView* rv, std::vector<RegionView*>&) const; void get_equivalent_tracks (RouteTimeAxisView*, std::set<RouteTimeAxisView*> &, ARDOUR::RouteGroup::Property) const;
void mapover_tracks (sigc::slot<void,RouteTimeAxisView&,uint32_t> sl, TimeAxisView*) const; void get_equivalent_regions (RegionView* rv, std::vector<RegionView*> &, ARDOUR::RouteGroup::Property) const;
RegionSelection get_equivalent_regions (RegionSelection &, ARDOUR::RouteGroup::Property) const;
void mapover_tracks (sigc::slot<void,RouteTimeAxisView&,uint32_t> sl, TimeAxisView*, ARDOUR::RouteGroup::Property) const;
/* functions to be passed to mapover_tracks(), possibly with sigc::bind()-supplied arguments */ /* functions to be passed to mapover_tracks(), possibly with sigc::bind()-supplied arguments */
void mapped_get_equivalent_regions (RouteTimeAxisView&, uint32_t, RegionView*, std::vector<RegionView*>*) const; void mapped_get_equivalent_regions (RouteTimeAxisView&, uint32_t, RegionView *, std::vector<RegionView*>*) const;
void mapped_use_new_playlist (RouteTimeAxisView&, uint32_t, std::vector<boost::shared_ptr<ARDOUR::Playlist> > const &); void mapped_use_new_playlist (RouteTimeAxisView&, uint32_t, std::vector<boost::shared_ptr<ARDOUR::Playlist> > const &);
void mapped_use_copy_playlist (RouteTimeAxisView&, uint32_t, std::vector<boost::shared_ptr<ARDOUR::Playlist> > const &); void mapped_use_copy_playlist (RouteTimeAxisView&, uint32_t, std::vector<boost::shared_ptr<ARDOUR::Playlist> > const &);
void mapped_clear_playlist (RouteTimeAxisView&, uint32_t); void mapped_clear_playlist (RouteTimeAxisView&, uint32_t);
@ -1145,7 +1148,6 @@ class Editor : public PublicEditor
void lower_region (); void lower_region ();
void lower_region_to_bottom (); void lower_region_to_bottom ();
void split_region (); void split_region ();
void split_region_at (nframes64_t);
void split_regions_at (nframes64_t, RegionSelection&); void split_regions_at (nframes64_t, RegionSelection&);
void split_region_at_transients (); void split_region_at_transients ();
void split_region_at_points (boost::shared_ptr<ARDOUR::Region>, ARDOUR::AnalysisFeatureList&, bool can_ferret); void split_region_at_points (boost::shared_ptr<ARDOUR::Region>, ARDOUR::AnalysisFeatureList&, bool can_ferret);

View file

@ -145,8 +145,6 @@ Drag::end_grab (GdkEvent* event)
_editor->hide_verbose_canvas_cursor(); _editor->hide_verbose_canvas_cursor();
update_selection ();
_ending = false; _ending = false;
return _had_movement; return _had_movement;
@ -253,14 +251,6 @@ RegionDrag::region_going_away (RegionView* v)
_views.remove (v); _views.remove (v);
} }
void
RegionDrag::update_selection ()
{
list<Selectable*> s;
copy (_views.begin(), _views.end(), back_inserter (s));
_editor->selection->set (s);
}
RegionMotionDrag::RegionMotionDrag (Editor* e, ArdourCanvas::Item* i, RegionView* p, list<RegionView*> const & v, bool b) RegionMotionDrag::RegionMotionDrag (Editor* e, ArdourCanvas::Item* i, RegionView* p, list<RegionView*> const & v, bool b)
: RegionDrag (e, i, p, v), : RegionDrag (e, i, p, v),
_dest_trackview (0), _dest_trackview (0),

View file

@ -114,9 +114,6 @@ public:
return true; return true;
} }
/** Called when a subclass should update the editor's selection following a drag */
virtual void update_selection () {}
protected: protected:
nframes64_t adjusted_current_frame (GdkEvent *) const; nframes64_t adjusted_current_frame (GdkEvent *) const;
@ -155,8 +152,6 @@ public:
RegionDrag (Editor *, ArdourCanvas::Item *, RegionView *, std::list<RegionView*> const &); RegionDrag (Editor *, ArdourCanvas::Item *, RegionView *, std::list<RegionView*> const &);
virtual ~RegionDrag () {} virtual ~RegionDrag () {}
void update_selection ();
protected: protected:
RegionView* _primary; ///< the view that was clicked on (or whatever) to start the drag RegionView* _primary; ///< the view that was clicked on (or whatever) to start the drag

View file

@ -820,16 +820,22 @@ Editor::button_press_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemTyp
switch (item_type) { switch (item_type) {
case FadeInHandleItem: case FadeInHandleItem:
{
assert (_drag == 0); assert (_drag == 0);
_drag = new FadeInDrag (this, item, reinterpret_cast<RegionView*> (item->get_data("regionview")), selection->regions); RegionSelection s = get_equivalent_regions (selection->regions, RouteGroup::Edit);
_drag = new FadeInDrag (this, item, reinterpret_cast<RegionView*> (item->get_data("regionview")), s);
_drag->start_grab (event); _drag->start_grab (event);
return true; return true;
}
case FadeOutHandleItem: case FadeOutHandleItem:
{
assert (_drag == 0); assert (_drag == 0);
_drag = new FadeOutDrag (this, item, reinterpret_cast<RegionView*> (item->get_data("regionview")), selection->regions); RegionSelection s = get_equivalent_regions (selection->regions, RouteGroup::Edit);
_drag = new FadeOutDrag (this, item, reinterpret_cast<RegionView*> (item->get_data("regionview")), s);
_drag->start_grab (event); _drag->start_grab (event);
return true; return true;
}
case RegionItem: case RegionItem:
if (Keyboard::modifier_state_contains (event->button.state, Keyboard::CopyModifier)) { if (Keyboard::modifier_state_contains (event->button.state, Keyboard::CopyModifier)) {
@ -842,19 +848,25 @@ Editor::button_press_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemTyp
break; break;
case RegionViewNameHighlight: case RegionViewNameHighlight:
{
assert (_drag == 0); assert (_drag == 0);
_drag = new TrimDrag (this, item, clicked_regionview, selection->regions.by_layer()); RegionSelection s = get_equivalent_regions (selection->regions, RouteGroup::Edit);
_drag = new TrimDrag (this, item, clicked_regionview, s.by_layer());
_drag->start_grab (event); _drag->start_grab (event);
return true; return true;
break; break;
}
case RegionViewName: case RegionViewName:
{
/* rename happens on edit clicks */ /* rename happens on edit clicks */
assert (_drag == 0); assert (_drag == 0);
_drag = new TrimDrag (this, clicked_regionview->get_name_highlight(), clicked_regionview, selection->regions.by_layer()); RegionSelection s = get_equivalent_regions (selection->regions, RouteGroup::Edit);
_drag = new TrimDrag (this, clicked_regionview->get_name_highlight(), clicked_regionview, s.by_layer());
_drag->start_grab (event); _drag->start_grab (event);
return true; return true;
break; break;
}
case ControlPointItem: case ControlPointItem:
assert (_drag == 0); assert (_drag == 0);
@ -2542,7 +2554,8 @@ Editor::start_region_grab (ArdourCanvas::Item* item, GdkEvent* event, RegionView
if (Config->get_edit_mode() == Splice) { if (Config->get_edit_mode() == Splice) {
_drag = new RegionSpliceDrag (this, item, region_view, selection->regions.by_layer()); _drag = new RegionSpliceDrag (this, item, region_view, selection->regions.by_layer());
} else { } else {
_drag = new RegionMoveDrag (this, item, region_view, selection->regions.by_layer(), false, false); RegionSelection s = get_equivalent_regions (selection->regions, RouteGroup::Edit);
_drag = new RegionMoveDrag (this, item, region_view, s.by_layer(), false, false);
} }
_drag->start_grab (event); _drag->start_grab (event);
@ -2560,7 +2573,9 @@ Editor::start_region_copy_grab (ArdourCanvas::Item* item, GdkEvent* event, Regio
assert (_drag == 0); assert (_drag == 0);
_region_motion_group->raise_to_top (); _region_motion_group->raise_to_top ();
_drag = new RegionMoveDrag (this, item, region_view, selection->regions.by_layer(), false, true);
RegionSelection s = get_equivalent_regions (selection->regions, RouteGroup::Edit);
_drag = new RegionMoveDrag (this, item, region_view, s.by_layer(), false, true);
_drag->start_grab(event); _drag->start_grab(event);
} }
@ -2574,7 +2589,8 @@ Editor::start_region_brush_grab (ArdourCanvas::Item* item, GdkEvent* event, Regi
return; return;
} }
_drag = new RegionMoveDrag (this, item, region_view, selection->regions.by_layer(), true, false); RegionSelection s = get_equivalent_regions (selection->regions, RouteGroup::Edit);
_drag = new RegionMoveDrag (this, item, region_view, s.by_layer(), true, false);
_drag->start_grab (event); _drag->start_grab (event);
begin_reversible_command (_("Drag region brush")); begin_reversible_command (_("Drag region brush"));

View file

@ -110,17 +110,11 @@ Editor::redo (uint32_t n)
void void
Editor::split_region () Editor::split_region ()
{
split_region_at (get_preferred_edit_position());
}
void
Editor::split_region_at (nframes64_t where)
{ {
RegionSelection rs; RegionSelection rs;
get_regions_for_action (rs); get_regions_for_action (rs, true);
split_regions_at (where, selection->regions); split_regions_at (get_preferred_edit_position (), selection->regions);
} }
void void
@ -5413,7 +5407,7 @@ Editor::split ()
{ {
RegionSelection rs; RegionSelection rs;
get_regions_for_action (rs); get_regions_for_action (rs, true);
nframes64_t where = get_preferred_edit_position(); nframes64_t where = get_preferred_edit_position();

View file

@ -261,76 +261,66 @@ Editor::get_onscreen_tracks (TrackViewList& tvl)
} }
} }
/** Given a track, find any other tracks that are in the same active route group with a given property.
* @param basis Base track.
* @param equivs Filled with the base track and the found tracks.
* @param prop Property to look for in route groups.
*/
void void
Editor::get_relevant_tracks (set<RouteTimeAxisView*>& relevant_tracks) Editor::get_equivalent_tracks (RouteTimeAxisView* basis, set<RouteTimeAxisView*> & equivs, RouteGroup::Property prop) const
{ {
/* step one: get all selected tracks and all tracks in the relevant edit groups */ equivs.insert (basis);
for (TrackSelection::iterator ti = selection->tracks.begin(); ti != selection->tracks.end(); ++ti) { RouteGroup* group = basis->route()->route_group();
if (group && group->active_property (prop)) {
RouteTimeAxisView* rtv = dynamic_cast<RouteTimeAxisView*>(*ti); /* the basis is a member of an active route group, with the appropriate
properties; find other members */
if (!rtv) { for (TrackViewList::const_iterator i = track_views.begin(); i != track_views.end(); ++i) {
continue; RouteTimeAxisView* v = dynamic_cast<RouteTimeAxisView*> (*i);
} if (v && v->route()->route_group() == group) {
equivs.insert (v);
RouteGroup* group = rtv->route()->route_group();
if (group && group->is_active()) {
/* active group for this track, loop over all tracks and get every member of the group */
for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) {
RouteTimeAxisView* trtv;
if ((trtv = dynamic_cast<RouteTimeAxisView*> (*i)) != 0) {
if (trtv->route()->route_group() == group) {
relevant_tracks.insert (trtv);
}
}
} }
} else {
relevant_tracks.insert (rtv);
} }
} }
} }
/** /** Find tracks that are selected, and also those that are in the same `selection'-enabled route
* Call a slot for a given `basis' track and also for any track that is in the same * group as one that is selected.
* active route group with the `select' property. * @param relevant_tracks set to add tracks to.
* @param sl Slot to call.
* @param basis Basis track.
*/ */
void void
Editor::mapover_tracks (slot<void, RouteTimeAxisView&, uint32_t> sl, TimeAxisView* basis) const Editor::get_relevant_tracks (set<RouteTimeAxisView*>& relevant_tracks) const
{
for (TrackSelection::iterator ti = selection->tracks.begin(); ti != selection->tracks.end(); ++ti) {
RouteTimeAxisView* rtv = dynamic_cast<RouteTimeAxisView*> (*ti);
if (rtv) {
get_equivalent_tracks (rtv, relevant_tracks, RouteGroup::Select);
}
}
}
/** Call a slot for a given `basis' track and also for any track that is in the same
* active route group with a particular set of properties.
*
* @param sl Slot to call.
* @param basis Basis track.
* @param prop Properties that active edit groups must share to be included in the map.
*/
void
Editor::mapover_tracks (slot<void, RouteTimeAxisView&, uint32_t> sl, TimeAxisView* basis, RouteGroup::Property prop) const
{ {
RouteTimeAxisView* route_basis = dynamic_cast<RouteTimeAxisView*> (basis); RouteTimeAxisView* route_basis = dynamic_cast<RouteTimeAxisView*> (basis);
if (route_basis == 0) { if (route_basis == 0) {
return; return;
} }
/* work out the tracks that we will call the slot for; use
a set here as it will disallow possible duplicates of the
basis track */
set<RouteTimeAxisView*> tracks; set<RouteTimeAxisView*> tracks;
get_equivalent_tracks (route_basis, tracks, prop);
/* always call for the basis */
tracks.insert (route_basis);
RouteGroup* group = route_basis->route()->route_group();
if (group && group->active_property (RouteGroup::Select)) {
/* the basis is a member of an active edit group; find other members */
for (TrackViewList::const_iterator i = track_views.begin(); i != track_views.end(); ++i) {
RouteTimeAxisView* v = dynamic_cast<RouteTimeAxisView*> (*i);
if (v && v->route()->route_group() == group) {
tracks.insert (v);
}
}
}
/* call the slots */ /* call the slots */
uint32_t const sz = tracks.size (); uint32_t const sz = tracks.size ();
@ -340,7 +330,7 @@ Editor::mapover_tracks (slot<void, RouteTimeAxisView&, uint32_t> sl, TimeAxisVie
} }
void void
Editor::mapped_get_equivalent_regions (RouteTimeAxisView& tv, uint32_t ignored, RegionView* basis, vector<RegionView*>* all_equivs) const Editor::mapped_get_equivalent_regions (RouteTimeAxisView& tv, uint32_t ignored, RegionView * basis, vector<RegionView*>* all_equivs) const
{ {
boost::shared_ptr<Playlist> pl; boost::shared_ptr<Playlist> pl;
vector<boost::shared_ptr<Region> > results; vector<boost::shared_ptr<Region> > results;
@ -369,15 +359,40 @@ Editor::mapped_get_equivalent_regions (RouteTimeAxisView& tv, uint32_t ignored,
} }
void void
Editor::get_equivalent_regions (RegionView* basis, vector<RegionView*>& equivalent_regions) const Editor::get_equivalent_regions (RegionView* basis, vector<RegionView*>& equivalent_regions, RouteGroup::Property prop) const
{ {
mapover_tracks (bind (mem_fun (*this, &Editor::mapped_get_equivalent_regions), basis, &equivalent_regions), &basis->get_trackview()); mapover_tracks (bind (mem_fun (*this, &Editor::mapped_get_equivalent_regions), basis, &equivalent_regions), &basis->get_trackview(), prop);
/* add clicked regionview since we skipped all other regions in the same track as the one it was in */ /* add clicked regionview since we skipped all other regions in the same track as the one it was in */
equivalent_regions.push_back (basis); equivalent_regions.push_back (basis);
} }
RegionSelection
Editor::get_equivalent_regions (RegionSelection & basis, RouteGroup::Property prop) const
{
RegionSelection equivalent;
for (RegionSelection::const_iterator i = basis.begin(); i != basis.end(); ++i) {
vector<RegionView*> eq;
mapover_tracks (
bind (mem_fun (*this, &Editor::mapped_get_equivalent_regions), *i, &eq),
&(*i)->get_trackview(), prop
);
for (vector<RegionView*>::iterator j = eq.begin(); j != eq.end(); ++j) {
equivalent.add (*j);
}
equivalent.add (*i);
}
return equivalent;
}
int int
Editor::get_regionview_count_from_region_list (boost::shared_ptr<Region> region) Editor::get_regionview_count_from_region_list (boost::shared_ptr<Region> region)
{ {
@ -467,7 +482,7 @@ Editor::set_selected_regionview_from_click (bool press, Selection::Operation op,
if (press) { if (press) {
if (selection->selected (clicked_routeview)) { if (selection->selected (clicked_routeview)) {
get_equivalent_regions (clicked_regionview, all_equivalent_regions); get_equivalent_regions (clicked_regionview, all_equivalent_regions, RouteGroup::Select);
} else { } else {
all_equivalent_regions.push_back (clicked_regionview); all_equivalent_regions.push_back (clicked_regionview);
} }
@ -487,7 +502,7 @@ Editor::set_selected_regionview_from_click (bool press, Selection::Operation op,
case Selection::Set: case Selection::Set:
if (!selection->selected (clicked_regionview)) { if (!selection->selected (clicked_regionview)) {
get_equivalent_regions (clicked_regionview, all_equivalent_regions); get_equivalent_regions (clicked_regionview, all_equivalent_regions, RouteGroup::Select);
selection->set (all_equivalent_regions); selection->set (all_equivalent_regions);
commit = true; commit = true;
} else { } else {

View file

@ -30,6 +30,8 @@
#include <jack/types.h> #include <jack/types.h>
#include <sigc++/signal.h> #include <sigc++/signal.h>
#include "ardour/route_group.h"
#include "pbd/statefuldestructible.h" #include "pbd/statefuldestructible.h"
#include "editing.h" #include "editing.h"
@ -273,7 +275,7 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulThingWithGoingAway
virtual RouteTimeAxisView* get_route_view_by_id (PBD::ID& id) = 0; virtual RouteTimeAxisView* get_route_view_by_id (PBD::ID& id) = 0;
virtual void get_equivalent_regions (RegionView* rv, std::vector<RegionView*>&) const = 0; virtual void get_equivalent_regions (RegionView* rv, std::vector<RegionView*>&, ARDOUR::RouteGroup::Property) const = 0;
sigc::signal<void> ZoomFocusChanged; sigc::signal<void> ZoomFocusChanged;
sigc::signal<void> ZoomChanged; sigc::signal<void> ZoomChanged;

View file

@ -333,7 +333,6 @@ Selection::add (const RegionSelection& rs)
} }
if (changed) { if (changed) {
select_edit_group_regions ();
RegionsChanged (); RegionsChanged ();
} }
} }
@ -742,24 +741,6 @@ Selection::add (vector<AutomationSelectable*>& autos)
PointsChanged (); PointsChanged ();
} }
void
Selection::select_edit_group_regions ()
{
std::set<RegionView*> regions_to_add;
for (RegionSelection::iterator i = regions.begin(); i != regions.end(); ++i) {
vector<RegionView*> e;
editor->get_equivalent_regions (*i, e);
for (vector<RegionView*>::iterator j = e.begin(); j != e.end(); ++j) {
regions_to_add.insert(*j);
}
}
for (std::set<RegionView*>::iterator i = regions_to_add.begin(); i != regions_to_add.end(); ++i) {
add (*i);
}
}
void void
Selection::set (Marker* m) Selection::set (Marker* m)
{ {

View file

@ -165,8 +165,6 @@ class Selection : public sigc::trackable
void foreach_regionview (void (RegionView::*method)(void)); void foreach_regionview (void (RegionView::*method)(void));
template<class A> void foreach_region (void (ARDOUR::Region::*method)(A), A arg); template<class A> void foreach_region (void (ARDOUR::Region::*method)(A), A arg);
void select_edit_group_regions ();
private: private:
PublicEditor const * editor; PublicEditor const * editor;
uint32_t next_time_id; uint32_t next_time_id;

View file

@ -73,7 +73,7 @@ public:
void set_hidden (bool yn, void *src); void set_hidden (bool yn, void *src);
bool property (Property p) const { bool property (Property p) const {
return ((_properties & p) != 0); return ((_properties & p) == p);
} }
bool active_property (Property p) const { bool active_property (Property p) const {