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
Родитель aa8fa1540c
Коммит a9b7fc80be
2 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@ -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);
}

Просмотреть файл

@ -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);
}