-
-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Overview
editors/base.py:on_pm_rename() uses pr.tree_ul.expanded_folders but this is incorrect.
Problem
pr.tree_ulreturns thePME_UL_pm_treeclass, not an instanceexpanded_foldersis an instance attribute ofTreeState, not a class attribute ofPME_UL_pm_tree- This causes
AttributeError: type object 'PME_UL_pm_tree' has no attribute 'expanded_folders'
Current Workaround
Changed to use tree_state.expanded_folders directly (commit pending).
Root Cause
The tree_ul property in preferences.py returns the class itself:
@property
def tree_ul(self):
return PME_UL_pm_treeThis worked previously because expanded_folders may have been a class attribute, but after the tree.py refactoring it became an instance attribute of TreeState.
Recommended Fix
Either:
- Remove
pr.tree_ulproperty and usetree_statedirectly everywhere - Or make
tree_ulreturntree_stateinstead of the class
Related: Phase 9-X extend_target implementation
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working