From 79d88f220090244e0c05f67d82d1b2ef3cb53e64 Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Mon, 30 Nov 2020 09:48:11 -0500 Subject: [PATCH] fix restore tabs on restore workspace from export --- src/kiri/main.js | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/src/kiri/main.js b/src/kiri/main.js index acbdb30d..19211707 100644 --- a/src/kiri/main.js +++ b/src/kiri/main.js @@ -1680,15 +1680,6 @@ return; } function doit() { - if (isSettings) { - settings = CONF.normalize(data.settings); - SDB.setItem('ws-settings', JSON.stringify(settings)); - if (LOCAL) console.log('settings',Object.clone(settings)); - restoreSettings(); - restoreWorkspace(() => { - UI.sync(); - }, true); - } if (isDevice) { if (settings.devices[data.device]) { UC.confirm(`Replace device ${data.device}?`).then(yes => { @@ -1702,14 +1693,23 @@ API.show.devices(); } } - if (isWork) { - API.platform.clear(); - KIRI.codec.decode(data.work).forEach(widget => { - platform.add(widget, 0, true); - }); - if (data.view) { - SPACE.view.load(data.view); + if (isSettings) { + settings = CONF.normalize(data.settings); + SDB.setItem('ws-settings', JSON.stringify(settings)); + if (LOCAL) console.log('settings',Object.clone(settings)); + restoreSettings(); + if (isWork) { + API.platform.clear(); + KIRI.codec.decode(data.work).forEach(widget => { + platform.add(widget, 0, true); + }); + if (data.view) { + SPACE.view.load(data.view); + } } + restoreWorkspace(() => { + UI.sync(); + }, true); } } if (ask) { @@ -1864,7 +1864,6 @@ updateFields(); platform.update_size(); - // platform.update_stock(); let fz = SPACE.scene.freeze(true); SPACE.view.reset();