mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-08 19:24:49 +02:00
Don't dispatch 'change' on history.merged, dispatch 'merge' only
Change performs an expensive immediate redraw, and merge can schedule a redraw for later.
This commit is contained in:
@@ -123,7 +123,6 @@ export function coreHistory(context) {
|
||||
_stack[0].graph.rebase(entities, stack, false);
|
||||
_tree.rebase(entities, false);
|
||||
|
||||
dispatch.call('change', this, undefined, extent);
|
||||
dispatch.call('merge', this, entities);
|
||||
},
|
||||
|
||||
|
||||
@@ -112,6 +112,7 @@ export function rendererMap(context) {
|
||||
}
|
||||
|
||||
context.history()
|
||||
.on('merge.map', function() { scheduleRedraw(); })
|
||||
.on('change.map', immediateRedraw)
|
||||
.on('undone.map', function(stack, fromStack) {
|
||||
didUndoOrRedo(stack, fromStack.transform);
|
||||
|
||||
Reference in New Issue
Block a user