mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-19 23:14:47 +02:00
Re-run validation automatically upon merging fetched remote data into the history
This commit is contained in:
@@ -465,6 +465,12 @@ export function coreContext() {
|
||||
issueManager.validate();
|
||||
}
|
||||
});
|
||||
// re-run validation upon merging fetched data
|
||||
history.on('merge', function(entities) {
|
||||
if (entities && entities.length > 0) {
|
||||
issueManager.validate();
|
||||
}
|
||||
});
|
||||
|
||||
// Debounce save, since it's a synchronous localStorage write,
|
||||
// and history changes can happen frequently (e.g. when dragging).
|
||||
|
||||
@@ -32,7 +32,7 @@ import {
|
||||
|
||||
|
||||
export function coreHistory(context) {
|
||||
var dispatch = d3_dispatch('change', 'annotatedChange', 'undone', 'redone');
|
||||
var dispatch = d3_dispatch('change', 'annotatedChange', 'merge', 'undone', 'redone');
|
||||
var lock = utilSessionMutex('lock');
|
||||
var duration = 150;
|
||||
var _imageryUsed = [];
|
||||
@@ -144,6 +144,7 @@ export function coreHistory(context) {
|
||||
_tree.rebase(entities, false);
|
||||
|
||||
dispatch.call('change', this, undefined, extent);
|
||||
dispatch.call('merge', this, entities);
|
||||
},
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user