mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 15:54:57 +01:00
maintain CoreSelection order in GUI track selection
This commit is contained in:
parent
dc0139d4af
commit
589f6f67a3
1 changed files with 11 additions and 27 deletions
|
|
@ -1640,37 +1640,21 @@ Selection::core_selection_changed (PropertyChange const & what_changed)
|
||||||
|
|
||||||
tracks.clear (); // clear stage for whatever tracks are now selected (maybe none)
|
tracks.clear (); // clear stage for whatever tracks are now selected (maybe none)
|
||||||
|
|
||||||
TrackViewList const & tvl (editor->get_track_views ());
|
CoreSelection::StripableAutomationControls sac;
|
||||||
|
selection.get_stripables (sac);
|
||||||
|
|
||||||
for (TrackViewList::const_iterator x = tvl.begin(); x != tvl.end(); ++x) {
|
for (CoreSelection::StripableAutomationControls::const_iterator i = sac.begin(); i != sac.end(); ++i) {
|
||||||
|
AxisView* av;
|
||||||
boost::shared_ptr<Stripable> s = (*x)->stripable ();
|
TimeAxisView* tav;
|
||||||
boost::shared_ptr<AutomationControl> c = (*x)->control ();
|
if ((*i).controllable) {
|
||||||
|
av = editor->axis_view_by_control ((*i).controllable);
|
||||||
if (!s) {
|
} else {
|
||||||
continue;
|
av = editor->axis_view_by_stripable ((*i).stripable);
|
||||||
}
|
}
|
||||||
|
|
||||||
TimeAxisView* tav = editor->time_axis_view_from_stripable (s);
|
tav = dynamic_cast<TimeAxisView*>(av);
|
||||||
|
if (tav) {
|
||||||
if (!tav) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((c && selection.selected (c)) || selection.selected (s)) {
|
|
||||||
tracks.push_back (tav);
|
tracks.push_back (tav);
|
||||||
}
|
}
|
||||||
|
|
||||||
TimeAxisView::Children kids = tav->get_child_list ();
|
|
||||||
|
|
||||||
for (TimeAxisView::Children::iterator j = kids.begin(); j != kids.end(); ++j) {
|
|
||||||
s = (*j)->stripable ();
|
|
||||||
c = (*j)->control ();
|
|
||||||
|
|
||||||
if ((c && selection.selected (c)) || selection.selected (s)) {
|
|
||||||
tracks.push_back ((*j).get());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue