mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-21 12:04:51 +00:00
select a row if there is no row selected when contextmenu is clicked
This commit is contained in:
parent
4852188ce9
commit
bccb7ca66e
1 changed files with 4 additions and 0 deletions
|
@ -125,6 +125,10 @@ Deluge.Torrents.Grid = new Ext.grid.GridPanel({
|
|||
'rowcontextmenu': {
|
||||
fn: function(grid, rowIndex, e) {
|
||||
e.stopEvent();
|
||||
var selection = grid.getSelectionModel();
|
||||
if (!selection.hasSelection()) {
|
||||
selection.selectRow(rowIndex);
|
||||
}
|
||||
Deluge.Menus.Torrent.showAt(e.getPoint());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue