mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-09 09:58:39 +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': {
|
'rowcontextmenu': {
|
||||||
fn: function(grid, rowIndex, e) {
|
fn: function(grid, rowIndex, e) {
|
||||||
e.stopEvent();
|
e.stopEvent();
|
||||||
|
var selection = grid.getSelectionModel();
|
||||||
|
if (!selection.hasSelection()) {
|
||||||
|
selection.selectRow(rowIndex);
|
||||||
|
}
|
||||||
Deluge.Menus.Torrent.showAt(e.getPoint());
|
Deluge.Menus.Torrent.showAt(e.getPoint());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue