Changeset 7011


Ignore:
Timestamp:
2004-03-10T20:26:13+13:00 (20 years ago)
Author:
mdewsnip
Message:

Fixed a bug where the workspace tree was not being refreshed when the filter was changed.

File:
1 edited

Legend:

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

    r6590 r7011  
    11package org.greenstone.gatherer.file;
    22
     3import javax.swing.tree.TreePath;
    34import org.greenstone.gatherer.collection.CollectionManager;
    45import org.greenstone.gatherer.file.FileNode;
     
    108109    loadCollectionSpecificMappings();
    109110    }
     111
     112
     113    public void refresh(TreePath path)
     114    {
     115    // If we're not refreshing the whole tree just refresh a certain path
     116    if (path != null) {
     117        super.refresh(path);
     118    }
     119
     120    // Refresh each of the nodes in the workspace tree
     121    for (int i = 0; i < workspace_tree_root.getChildCount(); i++) {
     122        FileNode child_node = (FileNode) workspace_tree_root.getChildAt(i);
     123        super.refresh(new TreePath(child_node.getPath()));
     124    }
     125    }
    110126}
Note: See TracChangeset for help on using the changeset viewer.