Skip to content

Commit

Permalink
merge lock a non keeper current item everywhere, not just in the one …
Browse files Browse the repository at this point in the history
…processing method #11
  • Loading branch information
sobri909 committed May 18, 2018
1 parent 5d5b01f commit 957fb3b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion LocoKit/Base/Timelines/Items/TimelineItem.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ open class TimelineItem: TimelineObject, Hashable, Comparable, Codable {

public let itemId: UUID

open var isMergeLocked: Bool { return false }
open var isMergeLocked: Bool {
if isCurrentItem && !isWorthKeeping { return true }
return false
}

public var hasBrokenEdges: Bool {
if deleted { return false }
Expand Down
2 changes: 1 addition & 1 deletion LocoKit/Base/Timelines/TimelineProcessor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public class TimelineProcessor {
workingItem.sanitiseEdges()

// add in the merges for one step forward
if let next = workingItem.nextItem, !next.isCurrentItem || next.isWorthKeeping {
if let next = workingItem.nextItem {
next.sanitiseEdges()

merges.insert(Merge(keeper: workingItem, deadman: next))
Expand Down

0 comments on commit 957fb3b

Please sign in to comment.