Fix enlarging for paste

Fix warning dialog "History node switched during undoable callback for Paste: Enlarge. This shouldn't happen."

Don't do an undoable inside an undoable.
main
Isaiah Odhner 2019-12-15 23:06:11 -05:00
parent e48d5ed955
commit 2f1c431f3f
1 changed files with 3 additions and 2 deletions

View File

@ -820,9 +820,10 @@ function paste(img){
ctx.fillRect(0, 0, canvas.width, canvas.height);
}
ctx.putImageData(original, 0, 0);
});
// (undoable callback is synchronous, so this runs after it)
do_the_paste();
$canvas_area.trigger("resize");
});
})[0].focus();
$w.$Button("Crop", () => {
$w.close();