diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-11-24 01:52:23 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-11-24 01:52:23 +0000 |
| commit | 8bef34f672815c3c9b4236d06fdee8dfd0bffbc2 (patch) | |
| tree | d37c47bf3ccb308f7a2959be0c2ef9c0e7ec9575 /src/lib/content.cc | |
| parent | c3da7c64f01420447dbab7f5c2ea42ff1b911cc5 (diff) | |
Various joining fixes.
Diffstat (limited to 'src/lib/content.cc')
| -rw-r--r-- | src/lib/content.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/lib/content.cc b/src/lib/content.cc index eaa55790b..f09012765 100644 --- a/src/lib/content.cc +++ b/src/lib/content.cc @@ -25,6 +25,7 @@ #include "content_factory.h" #include "ui_signaller.h" #include "exceptions.h" +#include "film.h" #include "i18n.h" @@ -102,6 +103,10 @@ Content::Content (shared_ptr<const Film> f, vector<shared_ptr<Content> > c) if (i < (c.size() - 1) && c[i]->trim_end ()) { throw JoinError (_("Only the last piece of content to be joined can have an end trim.")); } + + for (size_t j = 0; j < c[i]->number_of_paths(); ++j) { + _paths.push_back (c[i]->path (j)); + } } } @@ -186,7 +191,7 @@ Content::clone () const xmlpp::Document doc; xmlpp::Node* node = doc.create_root_node ("Content"); as_xml (node); - return content_factory (film, cxml::NodePtr(new cxml::Node (node))); + return content_factory (film, cxml::NodePtr (new cxml::Node (node)), Film::state_version); } string @@ -251,6 +256,8 @@ Content::path_summary () const { /* XXX: should handle multiple paths more gracefully */ + assert (number_of_paths ()); + string s = path(0).filename().string (); if (number_of_paths() > 1) { s += " ..."; |
