FIX: notes are not copied.

This commit is contained in:
Mészáros Gergely 2022-04-21 15:11:32 +02:00
parent e9b4a7b03a
commit 0c9d735f37
2 changed files with 4 additions and 2 deletions

View file

@ -315,6 +315,8 @@ window.Submap = (function () {
stage("Regenerating Zones."); stage("Regenerating Zones.");
addZones(); addZones();
Names.getMapName(); Names.getMapName();
stage("Restoring Notes.");
notes = parentMap.notes;
stage("Submap done."); stage("Submap done.");
WARN && console.warn(`TOTAL: ${rn((performance.now() - timeStart) / 1000, 2)}s`); WARN && console.warn(`TOTAL: ${rn((performance.now() - timeStart) / 1000, 2)}s`);

View file

@ -141,16 +141,16 @@ window.UISubmap = (function () {
async function startResample(options) { async function startResample(options) {
// Do model changes with Submap.resample then do view changes if needed. // Do model changes with Submap.resample then do view changes if needed.
undraw();
resetZoom(0); resetZoom(0);
let oldstate = { let oldstate = {
grid: deepCopy(grid), grid: deepCopy(grid),
pack: deepCopy(pack), pack: deepCopy(pack),
notes: deepCopy(notes),
seed, seed,
graphWidth, graphWidth,
graphHeight graphHeight
}; };
undraw();
try { try {
const oldScale = scale; const oldScale = scale;
await Submap.resample(oldstate, options); await Submap.resample(oldstate, options);