enable/disable download button correctly
This commit is contained in:
@@ -96,11 +96,12 @@ class SearchTabView {
|
|||||||
selectionModel.setSelectionMode(ListSelectionModel.SINGLE_SELECTION)
|
selectionModel.setSelectionMode(ListSelectionModel.SINGLE_SELECTION)
|
||||||
selectionModel.addListSelectionListener( {
|
selectionModel.addListSelectionListener( {
|
||||||
int row = resultsTable.getSelectedRow()
|
int row = resultsTable.getSelectedRow()
|
||||||
if (row < 0)
|
if (row < 0) {
|
||||||
|
model.downloadActionEnabled = false
|
||||||
return
|
return
|
||||||
|
}
|
||||||
if (lastSortEvent != null)
|
if (lastSortEvent != null)
|
||||||
row = resultsTable.rowSorter.convertRowIndexToModel(row)
|
row = resultsTable.rowSorter.convertRowIndexToModel(row)
|
||||||
model.trustButtonsEnabled = true
|
|
||||||
model.downloadActionEnabled = mvcGroup.parentGroup.model.canDownload(model.results[row].infohash)
|
model.downloadActionEnabled = mvcGroup.parentGroup.model.canDownload(model.results[row].infohash)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user