fix copying of hash if search results are sorted

This commit is contained in:
Zlatin Balevsky
2019-06-16 09:30:52 +01:00
parent aece390daa
commit 03c3b1ebf1

View File

@@ -145,7 +145,7 @@ class SearchTabView {
if (selected < 0)
return
if (lastSortEvent != null)
selected = resultsTable.rowSorter.convertRowIndexToModel(row)
selected = resultsTable.rowSorter.convertRowIndexToModel(selected)
String hash = Base64.encode(model.results[selected].infohash.getRoot())
StringSelection selection = new StringSelection(hash)
def clipboard = Toolkit.getDefaultToolkit().getSystemClipboard()