changeset 4859:bd2c6e6b661a

RT-32620: CheckBox cell factory in tree view unselects every cell
author jgiles
date Mon, 02 Sep 2013 13:33:14 +1200
parents 2e11c8f35ee5
children e60e9a5396e6
files modules/controls/src/main/java/javafx/scene/control/TreeItem.java
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/modules/controls/src/main/java/javafx/scene/control/TreeItem.java	Mon Sep 02 13:16:53 2013 +1200
+++ b/modules/controls/src/main/java/javafx/scene/control/TreeItem.java	Mon Sep 02 13:33:14 2013 +1200
@@ -538,6 +538,9 @@
         if (expanded == null) {
             expanded = new BooleanPropertyBase() {
                 @Override protected void invalidated() {
+                    // We don't fire expanded events for leaf nodes (RT-32620)
+                    if (isLeaf()) return;
+
                     EventType<?> evtType = isExpanded() ?
                         BRANCH_EXPANDED_EVENT : BRANCH_COLLAPSED_EVENT;