From fc146ab4eedca13d308551ca85a4bb3739b83fff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laura=20Kl=C3=BCnder?= Date: Wed, 19 Oct 2016 13:30:06 +0200 Subject: [PATCH] editor: only edit features of current feature type --- src/c3nav/editor/static/editor/js/editor.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/c3nav/editor/static/editor/js/editor.js b/src/c3nav/editor/static/editor/js/editor.js index 78d1296d..3c4d6ac4 100644 --- a/src/c3nav/editor/static/editor/js/editor.js +++ b/src/c3nav/editor/static/editor/js/editor.js @@ -282,6 +282,7 @@ editor = { $('.feature_list .hover').removeClass('hover'); }, _click_feature_layer: function(e) { + if (e.layer.feature.properties.feature_type != editor._feature_type) return; editor.start_editing(e.layer.feature.properties.name); if ((e.originalEvent.ctrlKey || e.originalEvent.metaKey) && this.editEnabled()) { if (e.layer.feature.properties.geomtype == 'polygon') {