diff --git a/spyder/plugins/outlineexplorer/widgets.py b/spyder/plugins/outlineexplorer/widgets.py index 925779412e4..58ab1e31dd0 100644 --- a/spyder/plugins/outlineexplorer/widgets.py +++ b/spyder/plugins/outlineexplorer/widgets.py @@ -608,8 +608,7 @@ def update_tree(self, items, editor): if not must_update: # Compare with current tree to check if it's necessary to update # it. - changes = tree - current_tree - if tree and len(changes) == 0: + if tree and tree == current_tree: logger.debug( f"Current and new trees for file {editor.fname} are the " f"same, so no update is necessary"