diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-02-01 23:19:13 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-02-01 23:19:13 +0000 |
| commit | d511d6702d66b93ead66c067be239173fd2d36f2 (patch) | |
| tree | 5d9b4575fd205176bef4ce6c0983ae0831ec78b4 /src/wx/timeline.cc | |
| parent | c7a0c827d30b7d82ac50e4cf559be2a3606ab6c3 (diff) | |
Synchronise content list / timeline selection when the content list selection changes.
Diffstat (limited to 'src/wx/timeline.cc')
| -rw-r--r-- | src/wx/timeline.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/wx/timeline.cc b/src/wx/timeline.cc index 8a61eccb0..8dee9610f 100644 --- a/src/wx/timeline.cc +++ b/src/wx/timeline.cc @@ -462,3 +462,14 @@ Timeline::selected_content () const return sel; } + +void +Timeline::set_selection (ContentList selection) +{ + for (TimelineViewList::iterator i = _views.begin(); i != _views.end(); ++i) { + shared_ptr<TimelineContentView> cv = dynamic_pointer_cast<TimelineContentView> (*i); + if (cv) { + cv->set_selected (find (selection.begin(), selection.end(), cv->content ()) != selection.end ()); + } + } +} |
