Changeset 4851


Ignore:
Timestamp:
2003-07-02T13:27:45+12:00 (21 years ago)
Author:
jmt12
Message:

Forgot to set model when adding children nodes during a collection root mapping.

File:
1 edited

Legend:

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

    r4800 r4851  
    200200    /** Adds child to the receiver at index. */
    201201    public void insert(MutableTreeNode child, int index) {
    202     ///ystem.err.println("Insert " + child + " in " + this + " at index " + index);
     202    ///ystem.err.println("Insert " + child + " in " + this + " at index " + index + " [Model: " + model + "]");
    203203    //map();
    204204    try {
    205205        children.add(index, child);
    206                 // Set parent and model.
     206        // Set parent and model.
    207207        FileNode new_child = (FileNode) child;
    208208        new_child.setModel(model);
     
    254254                FileNode collection_root = new FileNode(import_dir, cols[i].getName(), true);
    255255                collection_root.setParent(this);
     256                collection_root.setModel(model);
    256257                children.add(collection_root);
    257258                collection_root = null;
     
    270271            ArrayTools tools = new ArrayTools();
    271272            // Apply the filters set in the model.
     273            //if(model != null) {
    272274            FileFilter[] filters = model.getFilters();
    273275            for(int i = 0; filters != null && i < filters.length; i++) {
    274276            files = tools.filter(files, filters[i].filter, filters[i].exclude);
    275277            }
     278            //}
    276279            // If this node just happens to be the greenstone collection directory
    277280            if(Gatherer.c_man != null && Gatherer.c_man.ready() && file.equals(new File(Utility.getCollectionDir(Gatherer.config.gsdl_path)))) {
Note: See TracChangeset for help on using the changeset viewer.