summaryrefslogtreecommitdiff
path: root/src/wx/film_editor.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-08-08 20:00:15 +0100
committerCarl Hetherington <cth@carlh.net>2014-08-08 20:00:15 +0100
commit864467b923a8df73af37e3f662d2889735a7f95d (patch)
tree5a0f78cd13a47ad185134c6e6076367502acb8a4 /src/wx/film_editor.cc
parent39974161027c6f709828ed1f12b311198c6d1d29 (diff)
Allow support for changing timing details on multiple content simultaneously.
Diffstat (limited to 'src/wx/film_editor.cc')
-rw-r--r--src/wx/film_editor.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/wx/film_editor.cc b/src/wx/film_editor.cc
index bbf1fc8d5..98d30a2a3 100644
--- a/src/wx/film_editor.cc
+++ b/src/wx/film_editor.cc
@@ -872,7 +872,7 @@ FilmEditor::setup_content_sensitivity ()
_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);
+ _timing_panel->Enable (!selection.empty() && _generally_sensitive);
}
ContentList
@@ -880,6 +880,13 @@ FilmEditor::selected_content ()
{
ContentList sel;
long int s = -1;
+
+ /* The list was populated using a sorted content list, so we must sort it here too
+ so that we can look up by index and get the right thing.
+ */
+ ContentList content = _film->content ();
+ sort (content.begin(), content.end(), ContentSorter ());
+
while (true) {
s = _content->GetNextItem (s, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
if (s == -1) {
@@ -887,7 +894,7 @@ FilmEditor::selected_content ()
}
if (s < int (_film->content().size ())) {
- sel.push_back (_film->content()[s]);
+ sel.push_back (content[s]);
}
}