X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/f5240829880f87e0cf581c6a296e436fdef0ef80..0494b8d9b9bb03ab6c22b34dae81261e3cd7e3e6:/src/widgets/grid/RowSelectionModel.js diff --git a/src/widgets/grid/RowSelectionModel.js b/src/widgets/grid/RowSelectionModel.js index df0c9ca2..20c2c782 100644 --- a/src/widgets/grid/RowSelectionModel.js +++ b/src/widgets/grid/RowSelectionModel.js @@ -1,8 +1,8 @@ /*! - * Ext JS Library 3.3.0 - * Copyright(c) 2006-2010 Ext JS, Inc. - * licensing@extjs.com - * http://www.extjs.com/license + * Ext JS Library 3.3.1 + * Copyright(c) 2006-2010 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license */ /** * @class Ext.grid.RowSelectionModel @@ -119,7 +119,7 @@ Ext.grid.RowSelectionModel = Ext.extend(Ext.grid.AbstractSelectionModel, { s = this.getSelections(), i = 0, len = s.length, - index; + index, r; this.silent = true; this.clearSelections(true); @@ -514,9 +514,7 @@ Ext.grid.RowSelectionModel = Ext.extend(Ext.grid.AbstractSelectionModel, { r = newCell[0]; c = newCell[1]; - if(last.row != r){ - this.selectRow(r); // *** highlight newly-selected cell and update selection - } + this.onEditorSelect(r, last.row); if(g.isEditor && g.editing){ // *** handle tabbing while editorgrid is in edit mode ae = g.activeEditor; @@ -529,9 +527,15 @@ Ext.grid.RowSelectionModel = Ext.extend(Ext.grid.AbstractSelectionModel, { } }, + onEditorSelect: function(row, lastRow){ + if(lastRow != row){ + this.selectRow(row); // *** highlight newly-selected cell and update selection + } + }, + destroy : function(){ Ext.destroy(this.rowNav); this.rowNav = null; Ext.grid.RowSelectionModel.superclass.destroy.call(this); } -}); \ No newline at end of file +});