[hg] main-silver: Issue #240023 - Task is not shown in category ...

  • From: Jan Peska < >
  • To:
  • Subject: [hg] main-silver: Issue #240023 - Task is not shown in category ...
  • Date: Tue, 07 Jan 2014 22:53:27 +0000

changeset b66f6dcdf1a1 in main-silver ((none))
details: http://hg.netbeans.org/main-silver/rev/b66f6dcdf1a1
description:
        Issue #240023 - Task is not shown in category after drag&drop
        Children being empty does not mean they are not loaded - children are 
not loaded if the Collection.emptyList is returned

diffstat:

 
bugtracking/src/org/netbeans/modules/bugtracking/tasks/dashboard/TaskContainerNode.java
 |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (24 lines):

diff --git 
a/bugtracking/src/org/netbeans/modules/bugtracking/tasks/dashboard/TaskContainerNode.java
 
b/bugtracking/src/org/netbeans/modules/bugtracking/tasks/dashboard/TaskContainerNode.java
--- 
a/bugtracking/src/org/netbeans/modules/bugtracking/tasks/dashboard/TaskContainerNode.java
+++ 
b/bugtracking/src/org/netbeans/modules/bugtracking/tasks/dashboard/TaskContainerNode.java
@@ -165,7 +165,8 @@
 
     void updateContentAndSelect(Collection<TaskNode> toSelect) {
         this.toSelect = toSelect;
-        final boolean empty = getChildren().isEmpty();
+        List<TreeListNode> emptyList = Collections.emptyList();
+        final boolean childrenLoaded = getChildren() == emptyList;
         boolean expand = toSelect != null && !toSelect.isEmpty() && 
!isExpanded();
         updateNodes();
         updateCounts();
@@ -175,8 +176,8 @@
             setExpanded(true);
         }
 
-        // if getChildren().isEmpty() is true, refresh was already performed 
in setExpanded
-        if (!empty || !expand) {
+        // if getChildren() is the empty list children were not loaded and 
refresh was already performed in setExpanded
+        if (!childrenLoaded || !expand) {
             refreshChildren();
         }
     }

[hg] main-silver: Issue #240023 - Task is not shown in category ...

Jan Peska 01/07/2014

Project Features

About this Project

ConnectedDeveloper was started in November 2009, is owned by tpavek, and has 66 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20140418.2d69abc). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close