Commit 47f7d0e3 authored by Bram Schoenmakers's avatar Bram Schoenmakers

Only print todo items that were in the supplied list to be printed.

self.todolist.children() may return todo items outside the p_todos list,
so prevent that.
parent 93c657fe
......@@ -46,7 +46,11 @@ class DotPrinter(Printer):
# print edges
for todo in p_todos:
for child in self.todolist.children(todo, p_only_direct=True):
# only print the children that are actually in the list of todos
children = set(p_todos) & set(self.todolist.children(todo,
p_only_direct=True))
for child in children:
result += ' {} -> {}\n'.format(
node_name(todo),
node_name(child)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment