Enable fast open for files which support it

This commit is contained in:
Skyler Lehmkuhl 2025-01-14 19:57:10 -05:00
parent f0a3930ed7
commit 17fe5299dc
1 changed files with 91 additions and 82 deletions

View File

@ -4449,6 +4449,7 @@ async function _open(path, returnJson = false) {
const objectOffsets = {}; const objectOffsets = {};
const frameIDs = [] const frameIDs = []
if (file.version < "1.7.5") {
for (let action of file.actions) { for (let action of file.actions) {
if (!(action.name in actions)) { if (!(action.name in actions)) {
await messageDialog( await messageDialog(
@ -4541,6 +4542,14 @@ async function _open(path, returnJson = false) {
await actions[action.name].execute(action.action); await actions[action.name].execute(action.action);
undoStack.push(action); undoStack.push(action);
} }
} else {
// disabled for now
// for (let action of file.actions) {
// undoStack.push(action)
// }
root = GraphicsObject.fromJSON(file.json)
context.objectStack = [root]
}
lastSaveIndex = undoStack.length; lastSaveIndex = undoStack.length;
filePath = path; filePath = path;