Topic: Mif Tree Error when dragging last item to another list

I've created two trees, all working OK, and can drag between the two of them. However, when I drag the last item from a tree to the other tree, an error is thrown because the tree is left empty:

node is null
- thrown from the $getIndex function:
}while(node=node.getNextVisible());

It could take me a while to find a fix, but may be quicker to post here, as I'm sure someone's encountered this problem already. Two potential fixes I thought of are:

1) when the tree is emptied, don't try to do any tree-updating (though it's not immediately clearer what calls are made where)
2) better, would be to add a "dummy" item to the tree, indicating that it's now empty (and also making it clear where to drag items back to, from the other list).

If anyone has any solutions for this, or advice, please post a reply.

many thanks in advance,
Claude

Re: Mif Tree Error when dragging last item to another list

fixed in trunk