File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
dynamic_stack_decider_visualization/dynamic_stack_decider_visualization Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -312,6 +312,9 @@ def to_q_item_model(self):
312
312
# Start with the root/bottom of the stack
313
313
stack_element = self .stack
314
314
315
+ # Store the corresponding tree element
316
+ tree_element = self .tree
317
+
315
318
# Go through all stack elements
316
319
while stack_element is not None :
317
320
# Sanity check
@@ -327,7 +330,7 @@ def to_q_item_model(self):
327
330
# Set the text of the item
328
331
if stack_element ["type" ] == "sequence" :
329
332
# Get the names of all actions
330
- action_names = [element ["name" ] for element in stack_element [ "current_action " ]]
333
+ action_names = [action ["name" ] for action in tree_element [ "action_elements " ]]
331
334
# Join them together and set the text
332
335
elem_item .setText ("Sequence: " + ", " .join (action_names ))
333
336
else :
@@ -351,6 +354,9 @@ def to_q_item_model(self):
351
354
352
355
# Go to next element
353
356
stack_element = stack_element ["next" ]
357
+ # Also select the corresponding tree element if there are any
358
+ if "children" in tree_element and stack_element is not None :
359
+ tree_element = tree_element ["children" ][stack_element ["activation_reason" ]]
354
360
355
361
return model
356
362
You can’t perform that action at this time.
0 commit comments