Make ensureSelection check that there is something to select. Bug 213961,

patch by db48x@yahoo.com (Daniel Brooks), r=blake, sr=bzbarsky
This commit is contained in:
bzbarsky%mit.edu 2003-07-26 06:08:12 +00:00
parent f76e3889a4
commit 557d5ece5a
2 changed files with 6 additions and 2 deletions

View File

@ -498,7 +498,9 @@ function doGrab(iterator, i)
function ensureSelection(view)
{
if (view.selection.count == 0) // only select something if nothing is currently selected
// only select something if nothing is currently selected
// and that there's something to select
if (view.selection.count == 0 && view.rowCount)
view.selection.select(0);
}

View File

@ -514,7 +514,9 @@ function doGrab(iterator, meter, i)
function ensureSelection(view)
{
if (view.selection.count == 0) // only select something if nothing is currently selected
// only select something if nothing is currently selected
// and if there's anything to select
if (view.selection.count == 0 && view.rowCount)
view.selection.select(0);
}