From 39974161027c6f709828ed1f12b311198c6d1d29 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 8 Aug 2014 14:53:11 +0100 Subject: [PATCH] Allow removal of multiple bits of content at the same time. --- ChangeLog | 2 ++ src/wx/film_editor.cc | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6cc3c346e..7113e0fda 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2014-08-08 Carl Hetherington + * Allow removal of multiple bits of content at the same time. + * Version 1.72.7 released. 2014-08-04 Carl Hetherington diff --git a/src/wx/film_editor.cc b/src/wx/film_editor.cc index 854877ece..bbf1fc8d5 100644 --- a/src/wx/film_editor.cc +++ b/src/wx/film_editor.cc @@ -836,8 +836,8 @@ void FilmEditor::content_remove_clicked () { ContentList c = selected_content (); - if (c.size() == 1) { - _film->remove_content (c.front ()); + for (ContentList::iterator i = c.begin(); i != c.end(); ++i) { + _film->remove_content (*i); } content_selection_changed (); @@ -864,13 +864,13 @@ FilmEditor::setup_content_sensitivity () VideoContentList video_selection = selected_video_content (); AudioContentList audio_selection = selected_audio_content (); - _content_remove->Enable (selection.size() == 1 && _generally_sensitive); + _content_remove->Enable (!selection.empty() && _generally_sensitive); _content_earlier->Enable (selection.size() == 1 && _generally_sensitive); _content_later->Enable (selection.size() == 1 && _generally_sensitive); _content_timeline->Enable (!_film->content().empty() && _generally_sensitive); - _video_panel->Enable (video_selection.size() > 0 && _generally_sensitive); - _audio_panel->Enable (audio_selection.size() > 0 && _generally_sensitive); + _video_panel->Enable (!video_selection.empty() && _generally_sensitive); + _audio_panel->Enable (!audio_selection.empty() && _generally_sensitive); _subtitle_panel->Enable (selection.size() == 1 && dynamic_pointer_cast (selection.front()) && _generally_sensitive); _timing_panel->Enable (selection.size() == 1 && _generally_sensitive); } -- 2.30.2