Fixed bugs with deleting a task messing up indent model

pull/14/head
Sam Bosley 12 years ago
parent fe79994c6a
commit 8ec79a2eb9

@ -235,9 +235,15 @@ public abstract class NewOrderedListUpdater<LIST> {
Node parent = task.parent;
ArrayList<Node> siblings = parent.children;
siblings.remove(task);
int index = siblings.indexOf(task);
siblings.remove(index);
for (Node child : task.children) {
indentHelper(child, -1);
child.parent = parent;
child.indent = parent.indent + 1;
siblings.add(index, child);
adjustDescendantsIndent(child, child.indent);
index++;
}
idToNode.remove(taskId);
}

Loading…
Cancel
Save