mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 23:35:03 +01:00
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
3 changed files with 20 additions and 1 deletions
|
|
@ -1163,3 +1163,19 @@ Selection::set_state (XMLNode const & node, int)
|
||||||
|
|
||||||
return 0;
|
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 (const std::list<Selectable*>&);
|
||||||
void remove (Marker*);
|
void remove (Marker*);
|
||||||
|
|
||||||
|
void remove_regions (TimeAxisView *);
|
||||||
|
|
||||||
void replace (uint32_t time_index, framepos_t start, framepos_t end);
|
void replace (uint32_t time_index, framepos_t start, framepos_t end);
|
||||||
|
|
||||||
void clear_regions();
|
void clear_regions();
|
||||||
|
|
|
||||||
|
|
@ -372,8 +372,9 @@ TimeAxisView::hide ()
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if its hidden, it cannot be selected */
|
/* if its hidden, it cannot be selected */
|
||||||
|
|
||||||
_editor.get_selection().remove (this);
|
_editor.get_selection().remove (this);
|
||||||
|
/* and neither can its regions */
|
||||||
|
_editor.get_selection().remove_regions (this);
|
||||||
|
|
||||||
Hiding ();
|
Hiding ();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue