Changeset 5885


Ignore:
Timestamp:
2003-11-19T10:50:11+13:00 (20 years ago)
Author:
jmt12
Message:

The DragTree prevents drags originating with files already in the current collection

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/gui/tree/DragTree.java

    r5865 r5885  
    617617        return false;
    618618    }
     619    // We also don't allow the user to select files that reside within the currently loaded collection
     620    TreePath[] paths = getSelectionPaths();
     621    for(int i = 0; i < paths.length; i++) {
     622        FileNode child = (FileNode) paths[i].getLastPathComponent();
     623        if(child.isInCurrentCollection()) {
     624        return false;
     625        }
     626    }
    619627    return true;
    620628    }
Note: See TracChangeset for help on using the changeset viewer.