I am working on a checkbox tree with 2 levels of the tree and I'm getting 2 valueChanged events being fired for every checkbox I click on.
Here is my checkbox tree.
If I click on the "Root, test2, what" checkbox, I get an even fired with the following list as the selection list.
- Code: Select all
TreePath[] treeSelectionPaths = checkBoxTree.getCheckBoxTreeSelectionModel().getSelectionPaths();
[[Root], [Root, test1], [Root, test3], [Root, test2, who]]
1) What happened to all of the other paths that are selected?
2) Why am I getting a second TreeSelectionEvent being fired with the following list
[[Root, test2, who], [Root, test1], [Root, test3]]
Here is the CheckBoxTree after the 2 TreeSelectionEvents were fired.
Both times the valueChanged() call is handled I get incorrect paths from the getSelectionPaths() calls.
I would expect 1 event to be called with the correct list of TreePaths as follows
[[Root, test1, foo], [Root, test1, bar], [Root, test2, who], [Root, test3, is]]