Bug 591706 GroupItem.add: don't compute findInsertionPoint if we don't have a dropPos [r+a=dietrich]

This commit is contained in:
Michael Yoshitaka Erlewine 2010-09-03 14:58:29 -04:00
Родитель 85b674a456
Коммит e25a3c2344
1 изменённых файлов: 1 добавлений и 4 удалений

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

@ -582,9 +582,6 @@ window.GroupItem.prototype = Utils.extend(new Item(), new Subscribable(), {
item.removeTrenches();
if (!dropPos)
dropPos = {top:window.innerWidth, left:window.innerHeight};
if (typeof options == 'undefined')
options = {};
@ -638,7 +635,7 @@ window.GroupItem.prototype = Utils.extend(new Item(), new Subscribable(), {
}
// Insert the tab into the right position.
var index = findInsertionPoint(dropPos);
var index = dropPos ? findInsertionPoint(dropPos) : this._children.length;
this._children.splice(index, 0, item);
item.setZ(this.getZ() + 1);