Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Schindl2016-06-22 10:47:05 +0000
committerTom Schindl2016-06-22 10:47:05 +0000
commite73c19b89a471b6c0b6bba78fe579f319eea2ab5 (patch)
tree2a915d584f54827b3c6b5c9368c4b44c8331b54f
parent5ad219b28badc0a70170c64478e206af7d726297 (diff)
downloadorg.eclipse.efxclipse-e73c19b89a471b6c0b6bba78fe579f319eea2ab5.tar.gz
org.eclipse.efxclipse-e73c19b89a471b6c0b6bba78fe579f319eea2ab5.tar.xz
org.eclipse.efxclipse-e73c19b89a471b6c0b6bba78fe579f319eea2ab5.zip
Bug 496543 - TreeUtil should not show a sub-level marker if null is returned from the factory
-rwxr-xr-xbundles/runtime/org.eclipse.fx.ui.databinding/src/org/eclipse/fx/ui/databinding/TreeUtil.java18
1 files changed, 10 insertions, 8 deletions
diff --git a/bundles/runtime/org.eclipse.fx.ui.databinding/src/org/eclipse/fx/ui/databinding/TreeUtil.java b/bundles/runtime/org.eclipse.fx.ui.databinding/src/org/eclipse/fx/ui/databinding/TreeUtil.java
index d14f6cd0a..1f3b6f3e5 100755
--- a/bundles/runtime/org.eclipse.fx.ui.databinding/src/org/eclipse/fx/ui/databinding/TreeUtil.java
+++ b/bundles/runtime/org.eclipse.fx.ui.databinding/src/org/eclipse/fx/ui/databinding/TreeUtil.java
@@ -70,15 +70,17 @@ public class TreeUtil {
setValue(element);
this.factory = factory;
this.list = factory.createObservable(element);
- getChildren().add(new TreeItem<>());
-
- expandedProperty().addListener((o) -> {
- if( isExpanded() ) {
- if( ! this.hasLoadedChildren ) {
- loadChildren();
+ if( this.list != null ) {
+ getChildren().add(new TreeItem<>());
+
+ expandedProperty().addListener((o) -> {
+ if( isExpanded() ) {
+ if( ! this.hasLoadedChildren ) {
+ loadChildren();
+ }
}
- }
- });
+ });
+ }
}
// @Override

Back to the top