From c391ecc7faa1c9308df3ccd8a670b4d3802cd755 Mon Sep 17 00:00:00 2001 From: Marks Polakovs Date: Wed, 28 Apr 2021 08:57:01 +0100 Subject: [PATCH] Fix "repair failed" In a showplan with nothing in column 0 or 1 that is corrupt (has non-consecutive item weights), the repair code would generate invalid operations, because it used the index of the channel it was repairing rather than the correct channel number. --- src/showplanner/state.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/showplanner/state.ts b/src/showplanner/state.ts index 9b2731a..f945a0d 100644 --- a/src/showplanner/state.ts +++ b/src/showplanner/state.ts @@ -551,8 +551,8 @@ export const getShowplan = (timeslotId: number): AppThunk => async ( ops.push({ op: "MoveItem", timeslotitemid: item.timeslotitemid, - oldchannel: colIndex, - channel: colIndex, + oldchannel: item.channel, + channel: item.channel, oldweight: item.weight, weight: itemIndex, });