From 4afd071a001deb3290f26752a83832f359c9ea21 Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Fri, 3 May 2019 12:59:18 -0700 Subject: [PATCH] Add "Connect this feature" fix to disconnected ways if continuing drawing isn't possible --- data/core.yaml | 2 ++ dist/locales/en.json | 3 +++ modules/validations/disconnected_way.js | 7 ++++++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/data/core.yaml b/data/core.yaml index 097c5037d..4f44679f9 100644 --- a/data/core.yaml +++ b/data/core.yaml @@ -1452,6 +1452,8 @@ en: connect_endpoints: title: Connect the ends annotation: Connected the endpoints of a way. + connect_feature: + title: Connect this feature connect_features: title: Connect the features continue_from_start: diff --git a/dist/locales/en.json b/dist/locales/en.json index f20a0269a..bfc34c73c 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -1802,6 +1802,9 @@ "title": "Connect the ends", "annotation": "Connected the endpoints of a way." }, + "connect_feature": { + "title": "Connect this feature" + }, "connect_features": { "title": "Connect the features" }, diff --git a/modules/validations/disconnected_way.js b/modules/validations/disconnected_way.js index 591bd7bd8..0acaf3b84 100644 --- a/modules/validations/disconnected_way.js +++ b/modules/validations/disconnected_way.js @@ -27,7 +27,7 @@ export function validationDisconnectedWay() { if (entity.type === 'way' && !entity.isClosed()) { var firstID = entity.first(); var lastID = entity.last(); - + var first = context.entity(firstID); if (first.tags.noexit !== 'yes') { fixes.push(new validationIssueFix({ @@ -54,6 +54,11 @@ export function validationDisconnectedWay() { } })); } + + } else { + fixes.push(new validationIssueFix({ + title: t('issues.fix.connect_feature.title') + })); } if (!operationDelete([entity.id], context).disabled()) {