Unselect regions on tracks when the tracks are hidden. Fixes #3653.
git-svn-id: svn://localhost/ardour2/branches/3.0@8426 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
aea2a9f0d7
commit
fde56cc730
@ -1163,3 +1163,19 @@ Selection::set_state (XMLNode const & node, int)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
Selection::remove_regions (TimeAxisView* t)
|
||||
{
|
||||
RegionSelection::iterator i = regions.begin();
|
||||
while (i != regions.end ()) {
|
||||
RegionSelection::iterator tmp = i;
|
||||
++tmp;
|
||||
|
||||
if (&(*i)->get_time_axis_view() == t) {
|
||||
remove (*i);
|
||||
}
|
||||
|
||||
i = tmp;
|
||||
}
|
||||
}
|
||||
|
@ -174,6 +174,8 @@ class Selection : public sigc::trackable, public PBD::ScopedConnectionList
|
||||
void remove (const std::list<Selectable*>&);
|
||||
void remove (Marker*);
|
||||
|
||||
void remove_regions (TimeAxisView *);
|
||||
|
||||
void replace (uint32_t time_index, framepos_t start, framepos_t end);
|
||||
|
||||
void clear_regions();
|
||||
|
@ -372,8 +372,9 @@ TimeAxisView::hide ()
|
||||
}
|
||||
|
||||
/* if its hidden, it cannot be selected */
|
||||
|
||||
_editor.get_selection().remove (this);
|
||||
/* and neither can its regions */
|
||||
_editor.get_selection().remove_regions (this);
|
||||
|
||||
Hiding ();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user