From a4642b6463430175d0f4e1ca284a4bf08bcf4de9 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 27 May 2013 18:59:43 +0100 Subject: Fix multiple video adds to be consecutive. --- src/wx/film_editor.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/wx') 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 c; + if (ImageMagickContent::valid_file (p)) { - _film->add_content (shared_ptr (new ImageMagickContent (_film, p))); + c.reset (new ImageMagickContent (_film, p)); } else if (SndfileContent::valid_file (p)) { - _film->add_content (shared_ptr (new SndfileContent (_film, p))); + c.reset (new SndfileContent (_film, p)); } else { - _film->add_content (shared_ptr (new FFmpegContent (_film, p))); + c.reset (new FFmpegContent (_film, p)); } + + _film->examine_and_add_content (c); } } -- cgit v1.2.3