From eb3775446293a131618cc10cda056baa36493716 Mon Sep 17 00:00:00 2001 From: poanse <50020771+poanse@users.noreply.github.com> Date: Sat, 25 Apr 2026 06:43:53 +0300 Subject: [PATCH] fixed view not updating on reuse bug and undo/redo not working properly --- manifest.json | 2 +- package-lock.json | 2 +- package.json | 2 +- src/TaskmapView.ts | 2 +- src/components/SettingsButton.svelte | 4 ++++ 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/manifest.json b/manifest.json index 597c941..c34b8ad 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "taskmap", "name": "Taskmap", - "version": "0.1.2", + "version": "0.1.3", "minAppVersion": "1.12.4", "description": "Plan projects via interactive GUI task trees with automatic layout.", "author": "poanse", diff --git a/package-lock.json b/package-lock.json index a66371e..aad001a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "obsidian-taskmap", - "version": "0.1.2", + "version": "0.1.3", "lockfileVersion": 3, "requires": true, "packages": { diff --git a/package.json b/package.json index fd6d48b..bac7a88 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "obsidian-taskmap", - "version": "0.1.2", + "version": "0.1.3", "description": "Taskmap plugin for Obsidian (https://obsidian.md)", "main": "main.js", "scripts": { diff --git a/src/TaskmapView.ts b/src/TaskmapView.ts index 1137994..2971d91 100644 --- a/src/TaskmapView.ts +++ b/src/TaskmapView.ts @@ -45,7 +45,7 @@ export class TaskmapView extends TextFileView { async onLoadFile(file: TFile): Promise { this.file = file; const data = await this.app.vault.read(file); - this.setViewData(data); + this.setViewData(data, true); this.projectData = deserializeProjectData(data); this.context = new Context( this.app, diff --git a/src/components/SettingsButton.svelte b/src/components/SettingsButton.svelte index 7e5ad65..d25e13c 100644 --- a/src/components/SettingsButton.svelte +++ b/src/components/SettingsButton.svelte @@ -38,8 +38,12 @@ if (iconCode == SettingsIconCode.SETTINGS_UNDO) { context.versionedData.undo(); + context.save(); + context.updateTaskPositions(); } else if (iconCode == SettingsIconCode.SETTINGS_REDO) { context.versionedData.redo(); + context.save(); + context.updateTaskPositions(); } else if (iconCode == SettingsIconCode.SETTINGS_MENU) { new ProjectSettingsModal(context).open(); }