This should be able undo the last line you draw. It should be able to do unlimited undo's. :) There is a small flaw, though.. it leaves a little of the line left at each undo. I can fix it but i'm too tired. It is also very slow after the lists contain alot of information.