This is the first time I've played with the brush tool so I might be doing something wrong.
If I load an image as the base layer and use the brush tool to draw, everything is fine.
If I add a rectangle layer for example, this is where something goes wrong. When I start using the brush tool on that layer, the drawing appears to be limited to the top and left edges of the rectangle layer (nothing draws past those edges). There does not seem to be any limits on the bottom and right edges of that layer. That might be as designed, but the problem occurs when I stop drawing. The drawing suddenly moves to the top left of the main base layer as if the the drawing coordinates and the layer coordinates are misaligned.
Run the program and just start painting after you open an image. You will not be able to paint above or to the left of the rectangle and then whatever you painted will snap to the top left in the main image you loaded once you stop painting.
Thanks (makes sense). I will disable paint and erase unless the user has selected an image layer. My app allows them to convert other layer types to image layers for other purposes, so that will work.