Skip to content

Commit

Permalink
Retain group of merged path
Browse files Browse the repository at this point in the history
  • Loading branch information
kylecorry31 committed May 16, 2022
1 parent d7e201f commit d75c745
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,12 @@ class PathService(
val backtrackId = getBacktrackPathId()
val wasBacktrack = start.id == backtrackId || end.id == backtrackId
val style = start.style
val name = start.name
val name = start.name ?: end.name
val parentId = start.parentId
val startPoints = getWaypoints(startPathId)
val endPoints = getWaypoints(endPathId)

val newPathId = addPath(getEmptyPath(false).copy(name = name, style = style))
val newPathId = addPath(getEmptyPath(false).copy(name = name, style = style, parentId = parentId))

val allPoints = (startPoints + endPoints).map {
it.copy(id = 0)
Expand Down

0 comments on commit d75c745

Please sign in to comment.