I found a couple more annoying bugs due to bad design, namely the deletion of stuff that's being used currently on the map. Basically, if you create a tilesheet and use the tiles on the map, then go back to edit the tilesheet and delete some tiles... *poof* the application crashes.
This is again because the map itself has pointers to tile types which can't be destroyed without first nulling all the pointers which point to it. Which is easy enough to do, just something I should have thought of before.
Oh, and another oddity - mouse events which happen outside the bounds of the map (ie, too far right) should be ignored, not mis-parsed into tile clicks. Which is even easier to fix; can't believe I forgot to add that in...
Mushu trips over his own stupid.