diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2016-07-02 16:09:19 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-07-02 16:09:19 -0400 |
commit | 8b142a2fd6214c51ca1d1ccdcf043c6445141e24 (patch) | |
tree | d4333b8c97458fe08b04aaafeaf382e95e20b19d /gtk2_ardour/editor.cc | |
parent | 36d7e3c61b73acf5edc69fbbf7a8d2288bf0c30f (diff) |
make Selection catch up with session/libardour-side selection status at session load
Diffstat (limited to 'gtk2_ardour/editor.cc')
-rw-r--r-- | gtk2_ardour/editor.cc | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index fe27424844..3ee542b06a 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -1422,6 +1422,25 @@ Editor::set_session (Session *t) break; } + /* catch up on selection of stripables (other selection state is lost + * when a session is closed + */ + + StripableList sl; + TrackViewList tl; + _session->get_stripables (sl); + for (StripableList::const_iterator s = sl.begin(); s != sl.end(); ++s) { + if ((*s)->presentation_info().selected()) { + RouteTimeAxisView* rtav = get_route_view_by_route_id ((*s)->id()); + if (rtav) { + tl.push_back (rtav); + } + } + } + if (!tl.empty()) { + selection->set (tl); + } + /* register for undo history */ _session->register_with_memento_command_factory(id(), this); _session->register_with_memento_command_factory(_selection_memento->id(), _selection_memento); |