- Timestamp:
- 2004-03-26T18:08:56+12:00 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/gui/GatherPane.java
r7098 r7123 722 722 } 723 723 tree.setImmediate(false); 724 } else if (event.getKeyCode() == KeyEvent.VK_LEFT) { 725 // left key on a file shifts the selection to the parent folder 726 DragTree tree = (DragTree)event.getSource(); 727 TreePath path = tree.getLeadSelectionPath(); 728 if(path != null) { 729 File file = ((FileNode)path.getLastPathComponent()).getFile(); 730 if(file != null && file.isFile()) { 731 TreePath parent_path = path.getParentPath(); 732 if (parent_path != null && parent_path.getParentPath() != null) { 733 // if this file is in the top level folder, don't move the focus 734 tree.setImmediate(true); 735 tree.clearSelection(); 736 tree.setSelectionPath(parent_path); 737 tree.setImmediate(false); 738 } 739 } 740 } 724 741 } 725 742 }
Note:
See TracChangeset
for help on using the changeset viewer.