I've got a level editor that has a bunch of layers that you can place objects in, and it all works fine. But then I scroll away and scroll back and layer 2 draws over all the other layers except for layer 7 (the very top layer). It SHOULD be drawing underneath every layer except layer 1 (in other words drawing in the order of whatever number it is).
Since you mentioned it, I think that I possibly have had something screwy happen on layer 2 for me, but that might just be a coincidence. I think all I did was continue to stuff around with events like 'bring to front' or 'move to layer' and 'move in front of object'.
Okay, after closer inspection it's not just layer 2. If I move everything on layer 2 'to back', then layer 3 just starts doing it.
I worked out a very good solution, but it requires sorting lists. I need a data structure that is capable of stable sorts (http://en.wikipedia.org/wiki/Sorting_algorithm#Stability ) (MagicDeque and Dynamic Array are both unstable) on 2-dimensional arrays. Does anyone know if one exists?