Skip to content
Snippets Groups Projects
Commit 8f52e27f authored by Adrien Béraud's avatar Adrien Béraud
Browse files

scanner: clear nodeset on restart

parent 09ff99fa
No related branches found
No related tags found
No related merge requests found
...@@ -114,10 +114,10 @@ def step(cur_h, cur_depth): ...@@ -114,10 +114,10 @@ def step(cur_h, cur_depth):
def nextstep(cur_h, cur_depth, ok, nodes, arc=None, lines=[]): def nextstep(cur_h, cur_depth, ok, nodes, arc=None, lines=[]):
global done, all_nodes global done, all_nodes
if nodes:
if arc: if arc:
arc.remove() arc.remove()
del arc del arc
if nodes:
for l in lines: for l in lines:
l.set_color('#444444') l.set_color('#444444')
snodes = NodeSet() snodes = NodeSet()
...@@ -140,11 +140,14 @@ def exitcb(arg): ...@@ -140,11 +140,14 @@ def exitcb(arg):
exitbtn.on_clicked(exitcb) exitbtn.on_clicked(exitcb)
def restart(arg): def restart(arg):
global collection, all_lines, points global collection, all_lines, all_nodes, points, done
if done:
return
for l in all_lines: for l in all_lines:
l.remove() l.remove()
del l del l
all_lines = [] all_lines = []
all_nodes = NodeSet()
if collection: if collection:
collection.remove() collection.remove()
del collection del collection
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment