I didn't test it in detail, but I think I found a bug. If you draw some lines (just with the pen, but probably with other tools to), then open a new document (click the New button) and then use (for example) the Text tool, then the old lines re-appear.

Also, a feature where it warns you that you are about to throw away unsaved work would be nice. Just keep a boolean flag, set it to true when the user paints, and set it to false when he saves the image. Before creating a new image or closing the application or whatever, you can test the boolean and give the user the option to save before closing.

Otherwise it seems to work pretty well. Good job. Only downside is that the code is quite long and messy so probably hard to extend when you don't know exactly what's going on everywhere.