Allow removal of multiple bits of content at the same time.
authorCarl Hetherington <cth@carlh.net>
Fri, 8 Aug 2014 13:53:11 +0000 (14:53 +0100)
committerCarl Hetherington <cth@carlh.net>
Fri, 8 Aug 2014 13:53:11 +0000 (14:53 +0100)
ChangeLog
src/wx/film_editor.cc

index 6cc3c346ee9e887198691d01d6b4ae6836c7bcaf..7113e0fdaaeb1b10a64db9c180690051ea8e93bb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2014-08-08  Carl Hetherington  <cth@carlh.net>
 
+       * Allow removal of multiple bits of content at the same time.
+
        * Version 1.72.7 released.
 
 2014-08-04  Carl Hetherington  <cth@carlh.net>
index 854877ecec86d1e063b982a95dc6fc9222facac6..bbf1fc8d5f11d04683c4cf2e593e76254c8763cd 100644 (file)
@@ -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<FFmpegContent> (selection.front()) && _generally_sensitive);
        _timing_panel->Enable   (selection.size() == 1 && _generally_sensitive);
 }