Fix the up/down buttons in the content list.
authorCarl Hetherington <cth@carlh.net>
Fri, 27 Jun 2014 12:23:09 +0000 (13:23 +0100)
committerCarl Hetherington <cth@carlh.net>
Fri, 27 Jun 2014 12:23:09 +0000 (13:23 +0100)
Reported-by: Daniel Chauvet
ChangeLog
src/wx/film_editor.cc

index 6be780b4ba072b057a18cc3247f5ff6d5ed1c73c..80ab67b6b1c7a63971c9d6f564d9adc87fecdbe5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2014-06-27  Carl Hetherington  <cth@carlh.net>
+
+       * Fix up/down buttons in content list.
+
 2014-06-26  Carl Hetherington  <cth@carlh.net>
 
        * Version 1.70.0 released.
index 9c980b62568dbe037fd2456e215f7a848bb57cda..de215a0d294298a484f6407715ef7d9bb9b55933 100644 (file)
@@ -532,6 +532,8 @@ FilmEditor::film_content_changed (int property)
                setup_dcp_name ();
        } else if (property == ContentProperty::PATH) {
                setup_content ();
+       } else if (property == ContentProperty::POSITION) {
+               setup_content ();
        }
 }
 
@@ -753,6 +755,8 @@ FilmEditor::setup_content ()
        _content->DeleteAllItems ();
 
        ContentList content = _film->content ();
+       sort (content.begin(), content.end(), ContentSorter ());
+       
        for (ContentList::iterator i = content.begin(); i != content.end(); ++i) {
                int const t = _content->GetItemCount ();
                bool const valid = (*i)->paths_valid ();
@@ -761,7 +765,7 @@ FilmEditor::setup_content ()
                if (!valid) {
                        s = _("MISSING: ") + s;
                }
-                       
+
                _content->InsertItem (t, std_to_wx (s));
 
                if ((*i)->summary() == selected_summary) {