diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-05-27 18:59:43 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-05-27 18:59:43 +0100 |
| commit | a4642b6463430175d0f4e1ca284a4bf08bcf4de9 (patch) | |
| tree | 55bcf5cd135ea88a8fedc6931c6a33c4a90b0112 /src/wx | |
| parent | 951a81dbb75db9850ee0226f74a575af7335a576 (diff) | |
Fix multiple video adds to be consecutive.
Diffstat (limited to 'src/wx')
| -rw-r--r-- | src/wx/film_editor.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/wx/film_editor.cc b/src/wx/film_editor.cc index e6dd06472..d036f318e 100644 --- a/src/wx/film_editor.cc +++ b/src/wx/film_editor.cc @@ -1146,13 +1146,17 @@ FilmEditor::content_add_clicked (wxCommandEvent &) for (unsigned int i = 0; i < paths.GetCount(); ++i) { boost::filesystem::path p (wx_to_std (paths[i])); + shared_ptr<Content> c; + if (ImageMagickContent::valid_file (p)) { - _film->add_content (shared_ptr<ImageMagickContent> (new ImageMagickContent (_film, p))); + c.reset (new ImageMagickContent (_film, p)); } else if (SndfileContent::valid_file (p)) { - _film->add_content (shared_ptr<SndfileContent> (new SndfileContent (_film, p))); + c.reset (new SndfileContent (_film, p)); } else { - _film->add_content (shared_ptr<FFmpegContent> (new FFmpegContent (_film, p))); + c.reset (new FFmpegContent (_film, p)); } + + _film->examine_and_add_content (c); } } |
