Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ private void enableDragDrop()
// might still be present...
final TreeItem<FileInfo> deleted_item = getTableRow().getTreeItem();
deleted_item.getParent().getChildren().remove(deleted_item);
// Clear the stale selection so the tree view does not remain
// in a confused highlighted state after the item is removed.
getTreeTableView().getSelectionModel().clearSelection();
}
else
logger.log(Level.FINE, "Drag (COPY) completed.");
Expand Down Expand Up @@ -188,8 +191,15 @@ private void move_or_copy(final File file, final TreeItem<FileInfo> target_item,
{
// System.out.println("Add tree item for " + new_name + " to " + target_item.getValue());
final ObservableList<TreeItem<FileInfo>> siblings = target_item.getChildren();
siblings.add(new FileTreeItem(mon, new_name));
final FileTreeItem newItem = new FileTreeItem(mon, new_name);
siblings.add(newItem);
FileTreeItem.sortSiblings(siblings);
// Expand the target folder so the moved/copied file is
// immediately visible, then select it.
target_item.setExpanded(true);
final int idx = getTreeTableView().getRow(newItem);
if (idx >= 0)
getTreeTableView().getSelectionModel().select(idx);
});
}
catch (Exception ex)
Expand Down
Loading