Changeset 7208


Ignore:
Timestamp:
2004-04-20T10:18:21+12:00 (20 years ago)
Author:
mdewsnip
Message:

Fixed refreshing problem (Linux only?) where the collection tree is not refreshed correctly when dragging over the first file into a collection.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/file/FileSystemModel.java

    r6991 r7208  
    122122    public void refresh(TreePath path)
    123123    {
     124    // Can only refresh if the model is currently being displayed in a tree
     125    if (tree == null) {
     126        return;
     127    }
     128
    124129    // If no path is set, take the path to the root node (ie. update the whole tree)
    125130    if (path == null) {
    126131        // System.err.println("\nFileSystemModel.refresh(entire tree).");
    127132        path = new TreePath(((FileNode) root).getPath());
     133
     134        // Make sure the root node is expanded
     135        tree.expandPath(path);
    128136    }
    129137    // else {
    130138    //     System.err.println("\nFileSystemModel.refresh(" + path + ").");
    131139    // }
    132 
    133     // Can only refresh if the model is currently being displayed in a tree
    134     if (tree == null) {
    135         return;
    136     }
    137140
    138141    // Record all the expanded paths under this node
Note: See TracChangeset for help on using the changeset viewer.