This commit is contained in:
poanse 2026-05-02 22:24:34 +03:00
parent 11e87a9af8
commit a922d3fa31
2 changed files with 6 additions and 3 deletions

View file

@ -262,6 +262,7 @@ export class Context {
}
this.versionedData.changeParent(this.reparentingTaskId, newParentId);
this.updateTaskPositions();
this.cancelReparenting();
}
public changeFocusedTask(taskId: TaskId): void {
@ -274,7 +275,9 @@ export class Context {
}
public isAncestorOfHidden(taskId: TaskId): boolean {
return this.versionedData.getAncestorIds(this.focusedTaskId).includes(taskId);
return this.versionedData
.getAncestorIds(this.focusedTaskId)
.includes(taskId);
}
public updateTaskPositions(draggingOnly = false) {
@ -494,7 +497,8 @@ export class Context {
const projectNoteFolder = this.versionedData.getFolderPath();
const pluginNoteFolder = plugin.settings.newNoteFolder;
const taskmapPath =
plugin.app.workspace.getActiveViewOfType(TaskmapView)?.file?.parent?.path;
plugin.app.workspace.getActiveViewOfType(TaskmapView)?.file?.parent
?.path;
const folderPath =
projectNoteFolder || pluginNoteFolder || taskmapPath || "";

View file

@ -92,7 +92,6 @@
else if (context.isReparentingOn()) {
if (context.isValidReparentingTarget(taskId)) {
context.finishReparenting(taskId);
context.cancelReparenting();
}
} else {
context.pressedButtonCode = -1;