select a row if there is no row selected when contextmenu is clicked
This commit is contained in:
parent
4852188ce9
commit
bccb7ca66e
|
@ -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…
Reference in New Issue