You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Matt Palmer (Jira)" <ji...@apache.org> on 2019/11/16 22:03:00 UTC

[jira] [Created] (NETBEANS-3401) swing outline renders incorrectly with sorted columns

Matt Palmer created NETBEANS-3401:
-------------------------------------

             Summary: swing outline renders incorrectly with sorted columns
                 Key: NETBEANS-3401
                 URL: https://issues.apache.org/jira/browse/NETBEANS-3401
             Project: NetBeans
          Issue Type: Bug
          Components: platform - Outline&amp;TreeTable
    Affects Versions: 11.1, 11.0, 10.0, 9.0, 8.2, 11.2
         Environment: Ubuntu 16.04 and Windows 10.

            Reporter: Matt Palmer


If a swing outline component sorts the columns, and a node is expanded, all the children appear under arbitrary other nodes.

The problem can be cleared by clicking the column headers, forcing a tree update.

It is caused by a change from version 8.0 to 8.2 in EventBroadcaster.java, in the translateEvent() method.  It returns early with null  if there are no children affected - thus not firing a TableModelEvent:

   

    //Start with the number of children of whatever was expanded/collapsed
    int count = getTreeModel().getChildCount(path.getLastPathComponent());

    if (count == 0) {
         return null;
    }

However, we need this event to fire, even if there are no children, or the table model does not update correctly, and the rows appear in the wrong places (until you force a re-sort).

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists