removeObject=function(O)local V=NodeLookup[O]if not V then return end local G=nodeIsVisible(V)Selection:Remove(O,true)local Q=V.Parent remove(Q,V.Index)NodeLookup[O]=nil connLookup[O]:disconnect()connLookup[O]=nil if G then updateList()elseif nodeIsVisible(Q)then updateScroll()end end

removeObject = function(object)
	local objectNode = NodeLookup[object]
	if not objectNode then
		return
	end

	local visible = nodeIsVisible(objectNode)

	Selection:Remove(object,true)

	local parent = objectNode.Parent
	remove(parent,objectNode.Index)
	NodeLookup[object] = nil
	connLookup[object]:disconnect()
	connLookup[object] = nil

	if visible then
		updateList()
	elseif nodeIsVisible(parent) then
		updateScroll()
	end
end
