ges: make the offset positive as it should have been
authorMathieu Duponchelle <seeed@laposte.net>
Fri, 26 Aug 2011 16:39:39 +0000 (18:39 +0200)
committerThibault Saunier <thibault.saunier@collabora.com>
Wed, 11 Jan 2012 14:56:15 +0000 (11:56 -0300)
Took me two days to figure that out :/ I'm pretty sure it's the way things are supposed to be

ges/ges-timeline-object.c

index 2792afaa2ad5d4a4484545393f5190531f5b7610..45208c5f92abc9c40684d76801bbbe6629db7b6b 100644 (file)
@@ -866,7 +866,7 @@ ges_timeline_object_set_priority_internal (GESTimelineObject * object,
 
     } else {
       /* ... or update the offset */
-      map->priority_offset = layer_min_gnl_prio + priority - tr->priority;
+      map->priority_offset = tr->priority - layer_min_gnl_prio + priority;
     }
   }
 
@@ -1464,7 +1464,7 @@ track_object_priority_changed_cb (GESTrackObject * child,
 
     /* Update the internal priority_offset */
     map->priority_offset =
-        (layer_min_gnl_prio + object->priority) - tck_priority;
+        tck_priority - (layer_min_gnl_prio + object->priority);
 
   } else if (tck_priority < layer_min_gnl_prio + object->priority) {
     /* Or update the parent priority, the object priority is always the