All my layers merged and I can't undo it

My program crashed out of nowhere and now when I came back into it and opened up the drawing I’d been working on, I still had the same progress, but all the layers have merged and I can’t undo it. Can someone please help if you know what’s wrong?

Which version of krita and which operating system are you using?
Did the crash happen while it was Saving your drawing?

Is there an autosaved version in the folder?
There should be a backup version called filename.kra~ which will be the version before your last saved version.

What format did you save your file? Because most image format can’t store layes—you should always save your work as Krita document (.kra).

Oooooh OK thank you I had it saved as a .jpg for better quality and so I could actually post it

JPG compresses files by losing some of the image quality. Save as kra file while you are working on your painting and only export it to other file formats once you are done and want to post it—kra files will save at full quality and with all layers, layers styles etc.

Yes, something to get used to, always keep your original kra file unmolested, I always go “save as” just to be sure I’m saving it as a kra file. And if you want to save it as a jpe, png or something else, use the export function, and choose the file format. it’s all a bit slow and pedantic but at least you will not overwrite your precious kra file with all the layers.