Ignore:
Timestamp:
2006-01-23T15:21:56+13:00 (18 years ago)
Author:
mdewsnip
Message:

Some tidy ups so that the file nodes are always refreshed correctly when expanding.

File:
1 edited

Legend:

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

    r11082 r11083  
    2424    super(root);
    2525    root.setModel(this);
    26     root.map();
     26    root.refresh();
    2727    }
    2828
     
    259259    }
    260260
     261
    261262    /** Invoked whenever a node in the tree is about to be expanded. */
    262263    public void treeWillExpand(TreeExpansionEvent event)
    263     throws ExpandVetoException {
    264     // Set the wait cursor.
     264    throws ExpandVetoException
     265    {
     266    // Set the wait cursor
    265267    Gatherer.g_man.wait(true);
    266     // Allocate the children. Don't need to do this in a swing worker, as the nodes children are currently not visable.
     268
     269    // Allocate the children (don't need a swing worker since the node's children are currently not visible)
    267270    TreePath path = event.getPath();
    268271    FileNode node = (FileNode) path.getLastPathComponent();
    269     ///ystem.err.println("Mapping: " + node);
    270     node.map();
    271     ///ystem.err.println(" -> node has " + node.getChildCount() + " children");
     272    node.refresh();
    272273    nodeStructureChanged(node);
    273     // Restore the cursor.
     274
     275    // Restore the cursor
    274276    Gatherer.g_man.wait(false);
    275277    }
Note: See TracChangeset for help on using the changeset viewer.