From b62fde46e7100170b35974c5e31e234a819d7156 Mon Sep 17 00:00:00 2001 From: denise Date: Tue, 15 Oct 2013 15:20:58 -0400 Subject: [PATCH] CC-5407: Scheduling problem with global crossfade Sometimes we set a flag to not apply the global crossfade value when inserting tracks. This flag needs to get reset when more than one track is getting inserted or when inserting an item into a linked show --- airtime_mvc/application/models/Scheduler.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/airtime_mvc/application/models/Scheduler.php b/airtime_mvc/application/models/Scheduler.php index b367f1e01..9cbb2f965 100644 --- a/airtime_mvc/application/models/Scheduler.php +++ b/airtime_mvc/application/models/Scheduler.php @@ -535,6 +535,9 @@ class Application_Model_Scheduler $linked = false; foreach ($scheduleItems as $schedule) { + //reset + $this->applyCrossfades = true; + $id = intval($schedule["id"]); /* Find out if the show where the cursor position (where an item will @@ -597,6 +600,9 @@ class Application_Model_Scheduler $excludePositions = array(); foreach($instances as &$instance) { + //reset + $this->applyCrossfades = true; + $instanceId = $instance["id"]; if ($id !== 0) { /* We use the selected cursor's position to find the same @@ -616,11 +622,6 @@ class Application_Model_Scheduler $instanceId); $pos++; - - /* Show is not empty so we need to apply crossfades - * for the first inserted item - */ - //$applyCrossfades = true; } //selected empty row to add after else {