# HG changeset patch # User Matti Hamalainen # Date 1530890428 -10800 # Node ID 044e3371d44b03eefae8a8b6049447baf5f6c556 # Parent ae324b1a020f7faa03c047d320df9806117563c8 Do store_undo() in mpSetNativeImage() when supposedly successfully loading an image, instead of out of the function. diff -r ae324b1a020f -r 044e3371d44b multipaint.pde --- a/multipaint.pde Fri Jul 06 18:16:26 2018 +0300 +++ b/multipaint.pde Fri Jul 06 18:20:28 2018 +0300 @@ -409,6 +409,8 @@ if (data[3] != machine && !noError) return -2; + store_undo(); + g_map = data; refreshpalette(); @@ -506,7 +508,6 @@ int err = mpSetNativeImage(fdata); if (err == 0) { - store_undo(); mpSetTitle(fh.name); if (g_spare) sfilename = fh.name;