fix copying of hash if search results are sorted

pull/5/head
Zlatin Balevsky 2019-06-16 09:30:52 +01:00
parent aece390daa
commit 03c3b1ebf1
1 changed files with 1 additions and 1 deletions

View File

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