Details
-
Bug
-
Resolution: Fixed
-
P4
-
8u20
-
Windows 8.1 (64bit), JDK 8u20-b15
Description
As a TreeTableView item is expanded and collapsed, the change notifications for selectedItems can sometimes contain null items. It looks like the changes are derived from selected indexes which creates change notifications that don't always make sense.
The below example also includes a case that I find confusing. The notification for childOne being removed from selectedItems doesn't make sense since it was never selected. Another issue related to having more accurate change notifications is https://javafx-jira.kenai.com/browse/RT-37360.
Steps to reproduce:
1. Run the below example.
2. Select item "three".
3. Expand item "two".
4. Collapse item "two".
https://gist.github.com/ryanjaeb/613028767e336a206d7c
You'll get the following output:
--- initial selection on program start ---
Change event...
Change:
Added: one
-- caused by selecting item "three"--
Change event...
Change:
Removed: one
Added: three
-- caused by expanding item "two"--
Change event...
Change:
Removed: childOne
Change event...
Change:
Added: three
-- caused by collapsing item "two"--
Change event...
Change:
Removed: TreeItem was null.
Change event...
Change:
Added: three
The below example also includes a case that I find confusing. The notification for childOne being removed from selectedItems doesn't make sense since it was never selected. Another issue related to having more accurate change notifications is https://javafx-jira.kenai.com/browse/RT-37360.
Steps to reproduce:
1. Run the below example.
2. Select item "three".
3. Expand item "two".
4. Collapse item "two".
https://gist.github.com/ryanjaeb/613028767e336a206d7c
You'll get the following output:
--- initial selection on program start ---
Change event...
Change:
Added: one
-- caused by selecting item "three"--
Change event...
Change:
Removed: one
Added: three
-- caused by expanding item "two"--
Change event...
Change:
Removed: childOne
Change event...
Change:
Added: three
-- caused by collapsing item "two"--
Change event...
Change:
Removed: TreeItem was null.
Change event...
Change:
Added: three