summaryrefslogtreecommitdiff
path: root/src/wx/content_panel.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-09-26 12:33:40 +0100
committerCarl Hetherington <cth@carlh.net>2016-09-26 12:33:40 +0100
commitf68a5f1ddd60ade2ed9a68d180ecf553e94b853f (patch)
treea1eaa3823b76830559e3e8f7803c000dde8747f1 /src/wx/content_panel.cc
parent98ca07e59feac950838412bfa7e5c2e3ddd71d7e (diff)
Fix multi-select in the timeline (#954).
Diffstat (limited to 'src/wx/content_panel.cc')
-rw-r--r--src/wx/content_panel.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/wx/content_panel.cc b/src/wx/content_panel.cc
index b28d9ca22..7bea51687 100644
--- a/src/wx/content_panel.cc
+++ b/src/wx/content_panel.cc
@@ -466,6 +466,19 @@ ContentPanel::set_selection (weak_ptr<Content> wc)
}
void
+ContentPanel::set_selection (ContentList cl)
+{
+ ContentList content = _film->content ();
+ for (size_t i = 0; i < content.size(); ++i) {
+ if (find(cl.begin(), cl.end(), content[i]) != cl.end()) {
+ _content->SetItemState (i, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED);
+ } else {
+ _content->SetItemState (i, 0, wxLIST_STATE_SELECTED);
+ }
+ }
+}
+
+void
ContentPanel::film_content_changed (int property)
{
if (property == ContentProperty::PATH || property == DCPContentProperty::NEEDS_ASSETS || property == DCPContentProperty::NEEDS_KDM) {