Add "Connect this feature" fix to disconnected ways if continuing drawing isn't possible

This commit is contained in:
Quincy Morgan
2019-05-03 12:59:18 -07:00
parent dbc3978d71
commit 4afd071a00
3 changed files with 11 additions and 1 deletions
+2
View File
@@ -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:
+3
View File
@@ -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"
},
+6 -1
View File
@@ -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()) {