-
Bug
-
Resolution: Fixed
-
Normal
-
8.0.5
-
Security Level: Jimmy
-
None
-
None
Steps to Reproduce
http://zkfiddle.org/sample/3djug99/7-Hidden-selected-tree-nodes-ignored-in-onSelect
1. click "select all"
2. unselect any level 1 node (e.g. "2")
3. observe the logs
Current Result
previous: [1.1, 1.2, 1, 2.1, 2.2, 2.3, 2, 3.1, 3] current from event: [3, 1] unselected from event: [2] current from model: [1.1, 1.2, 1, 2.1, 2.2, 2.3, 3.1, 3]
Expected Result
previous: [1.1, 1.2, 1, 2.1, 2.2, 2.3, 2, 3.1, 3] current from event: [1.1, 2.3, 2.2, 2.1, 1.2, 3.1, 3, 1] unselected from event: [2] current from model: [1.1, 1.2, 1, 2.1, 2.2, 2.3, 3.1, 3]
Debug Info
getSelectedObjects returns objects based on the currently rendered treeitems
getPreviousSelectedObjects returns objects based on the actual model
this is inconsistent and confusing
Workaround
instead of calling selectEvent.getSelectedObjects() call treeModel.getSelection() (which is synchronized correctly)