diff --git a/lib/editor/actions/map/stopStrategies.js b/lib/editor/actions/map/stopStrategies.js index f074a5346..cd192837e 100644 --- a/lib/editor/actions/map/stopStrategies.js +++ b/lib/editor/actions/map/stopStrategies.js @@ -227,6 +227,7 @@ export function addStopToPattern (pattern, stop, index) { return dispatch(saveActiveGtfsEntity('trippattern')) }) } else { + dispatch(updatePatternStops(pattern, patternStops)) // Otherwise, check if a shape ought to be created. Then, save. if (patternStops.length === 2 && followStreets) { // Create shape between stops the added stop is the second one and @@ -242,7 +243,6 @@ export function addStopToPattern (pattern, stop, index) { .map((stop, index) => ({lng: stop.stop_lon, lat: stop.stop_lat})) const patternSegments = await getPolyline(points, true) // Update pattern stops and geometry. - dispatch(updatePatternStops(pattern, patternStops)) const controlPoints = controlPointsFromSegments(patternStops, patternSegments) dispatch(updatePatternGeometry({controlPoints, patternSegments})) }