summaryrefslogtreecommitdiff
path: root/src/wx
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-01-30 20:39:12 +0000
committerCarl Hetherington <cth@carlh.net>2016-01-30 20:39:12 +0000
commita1839a88ab0cffdf04737dae783c21f27f65d491 (patch)
treed29b528c385a591a4bd46e1da23be6e4aae255a5 /src/wx
parent4e617f7dee7b4b78555ca3e80e77d26d4fa8f884 (diff)
Add a PlaylistOrderChanged signal and emit it when the playlist
is sorted. Do playlist sorting when content position / length etc. changes. Handle sorts better when comparing content at the same position.
Diffstat (limited to 'src/wx')
-rw-r--r--src/wx/content_panel.cc4
-rw-r--r--src/wx/timeline.cc16
2 files changed, 10 insertions, 10 deletions
diff --git a/src/wx/content_panel.cc b/src/wx/content_panel.cc
index 1f9352f06..06c371348 100644
--- a/src/wx/content_panel.cc
+++ b/src/wx/content_panel.cc
@@ -210,6 +210,7 @@ ContentPanel::film_changed (Film::Property p)
{
switch (p) {
case Film::CONTENT:
+ case Film::CONTENT_ORDER:
setup ();
break;
default:
@@ -422,7 +423,7 @@ ContentPanel::set_selection (weak_ptr<Content> wc)
void
ContentPanel::film_content_changed (int property)
{
- if (property == ContentProperty::PATH || property == ContentProperty::POSITION || property == DCPContentProperty::CAN_BE_PLAYED) {
+ if (property == ContentProperty::PATH || property == DCPContentProperty::CAN_BE_PLAYED) {
setup ();
}
@@ -435,7 +436,6 @@ void
ContentPanel::setup ()
{
ContentList content = _film->content ();
- sort (content.begin(), content.end(), ContentSorter ());
/* First, check to see if anything has changed and bail if not; this avoids
flickering on OS X.
diff --git a/src/wx/timeline.cc b/src/wx/timeline.cc
index 952945884..8a61eccb0 100644
--- a/src/wx/timeline.cc
+++ b/src/wx/timeline.cc
@@ -101,6 +101,13 @@ Timeline::film_changed (Film::Property p)
if (p == Film::CONTENT || p == Film::REEL_TYPE || p == Film::REEL_LENGTH) {
ensure_ui_thread ();
recreate_views ();
+ } else if (p == Film::CONTENT_ORDER) {
+ assign_tracks ();
+ if (!_left_down) {
+ /* Only do this if we are not dragging, as it's confusing otherwise */
+ setup_pixels_per_second ();
+ }
+ Refresh ();
}
}
@@ -142,14 +149,7 @@ Timeline::film_content_changed (int property)
{
ensure_ui_thread ();
- if (property == ContentProperty::POSITION) {
- assign_tracks ();
- if (!_left_down) {
- /* Only do this if we are not dragging, as it's confusing otherwise */
- setup_pixels_per_second ();
- }
- Refresh ();
- } else if (property == AudioContentProperty::AUDIO_STREAMS) {
+ if (property == AudioContentProperty::AUDIO_STREAMS) {
recreate_views ();
}
}