mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
TreeUi: NPE fix for isAutoExpand
This commit is contained in:
@@ -828,17 +828,20 @@ public class AbstractTreeUi {
|
||||
final boolean toSmartExpand,
|
||||
boolean forceUpdate,
|
||||
final boolean descriptorIsUpToDate) {
|
||||
getTreeStructure().commit();
|
||||
final boolean wasExpanded = myTree.isExpanded(new TreePath(node.getPath())) || isAutoExpand(node);
|
||||
final boolean wasLeaf = node.getChildCount() == 0;
|
||||
|
||||
try {
|
||||
getTreeStructure().commit();
|
||||
|
||||
|
||||
final NodeDescriptor descriptor = getDescriptorFrom(node);
|
||||
if (descriptor == null) {
|
||||
removeLoading(node, true);
|
||||
return;
|
||||
}
|
||||
|
||||
final boolean wasExpanded = myTree.isExpanded(new TreePath(node.getPath())) || isAutoExpand(node);
|
||||
final boolean wasLeaf = node.getChildCount() == 0;
|
||||
|
||||
|
||||
boolean bgBuild = isToBuildInBackground(descriptor);
|
||||
boolean notRequiredToUpdateChildren = !forcedNow && !wasExpanded;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user