mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-20 23:44:47 +02:00
Run validation upon data restore after page reload
This commit is contained in:
@@ -459,6 +459,10 @@ export function coreContext() {
|
||||
|
||||
issueManager = IssueManager(context);
|
||||
|
||||
// run validation upon restoring from page reload
|
||||
history.on('restore', function() {
|
||||
issueManager.validate();
|
||||
});
|
||||
// re-run validation upon a significant graph change
|
||||
history.on('annotatedChange', function(difference) {
|
||||
if (difference) {
|
||||
|
||||
@@ -32,7 +32,7 @@ import {
|
||||
|
||||
|
||||
export function coreHistory(context) {
|
||||
var dispatch = d3_dispatch('change', 'annotatedChange', 'merge', 'undone', 'redone');
|
||||
var dispatch = d3_dispatch('change', 'annotatedChange', 'merge', 'restore', 'undone', 'redone');
|
||||
var lock = utilSessionMutex('lock');
|
||||
var duration = 150;
|
||||
var _imageryUsed = [];
|
||||
@@ -625,6 +625,7 @@ export function coreHistory(context) {
|
||||
|
||||
var json = context.storage(getKey('saved_history'));
|
||||
if (json) history.fromJSON(json, true);
|
||||
dispatch.call('restore', this);
|
||||
},
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user