Bug 395774 - Doesn't prompt to save KRA before Saving as PNG
Summary: Doesn't prompt to save KRA before Saving as PNG
Status: RESOLVED WORKSFORME
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: 4.0.4
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-22 23:40 UTC by Kenneth Evans
Modified: 2018-06-26 03:12 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kenneth Evans 2018-06-22 23:40:49 UTC
Since it is going to close the KRA document or at least rename it to PNG, any unsaved changes to the KRA document are lost when you Save As | PNG (and probably others).

This has caught me twice now.

Actually I would prefer it not rename the document to PNG but continue working on the KRA, but this issue is just asking it to be fixed to prompt you to avoid losing work.
Comment 1 Halla Rempt 2018-06-23 07:14:14 UTC
Export doesn't change the file type, so you probably want to use that. And thesave as dialog already shows a checkbox you can use to save both as .png and .kra.
Comment 2 Kenneth Evans 2018-06-24 02:49:17 UTC
Thanks, I'll try export.

However I think this should be fixed. Having a check box in a dialog is a long ways from prompting you for sure to not lose your work.

It is almost universal to ask to save before leaving unsaved work (for good reason). Krita is not doing that in this case, and that makes it unfriendly.

And it isn't that hard to fix.
Comment 3 Halla Rempt 2018-06-25 11:22:36 UTC
But Krita _already_ warns you if you're saving to a file format that will lose information. If you don't read that warning, I don't think another warning will help. 

And if you close krita and your work has unsaved changes, Krita already asks you whether you want to save it; and if Krita warns that your chosen file format will lose information, you can cancel and go back to your image.
Comment 4 Victor Wåhlström 2018-06-25 18:39:23 UTC
While "Export" would avoid this problem entirely, I don't think the original report is without merit.

I'm not sure everyone is aware of the difference between "Save As" and "Export", and what they do exactly. Given that "Save As" is pretty consistent across applications and "Export" might not even exist, it's easy to default to the familiar "Save As" even though "Export" is what you want.

Since the data in the current session is not immediately lost when you save to a different format, you can simply recover from a "Save As: PNG" situation by using "Save As" again and save to KRA.

The real problem is that once you use "Save As", Krita clears the dirty state, allowing for the following scenario:

1. Create a new document
2. Draw something
3. Save as KRA
4. Continue working
5. Save as PNG
6. Close Krita
7. Krita won't warn you about unsaved changes, discarding all work done in step 4.

Sure, you still have the PNG file, but that's missing a bunch of data.

One way to avoid this scenario is to have Krita keep track of the last time you saved the current session as KRA, separately from the internal dirty state. This way, Krita knows that there are "unsaved" changes when you close the document, despite having just saved it to PNG.
Comment 5 Kenneth Evans 2018-06-26 00:18:48 UTC
I tried export and that is probably what I should be using. I didn't realize that, and was using what I would in other programs. Thanks.

I still think it should be fixed. Being warned about losing information is a completely different thing. (I never even noticed that warning. It's very small print on my computer.) Of course you lose information saving to PNG. That has nothing to do with unsaved changes 

The point is I am losing unsaved changes in the KRA file and am never prompted about that. That is a bad thing.

I may have missed all the items you mentioned. After all, had I been careful, I would have saved anyway. I will not miss a prompt I have to respond to.

The steps in the message above is what has happened to me. If I had been more alert I would have saved the KRA file anyway before saving the PNG and usually do. The prompt prevents oversights and mistakes.

Note that you are leaving the KRA document and entering a completely different document as it is implemented. Unsaved changes are lost. What more can I say.
Comment 6 vanyossi 2018-06-26 03:12:51 UTC
This is probably one of the reasons GIMP made "Save" and "Save As" XCF exclusive and other formats can only be saved using export. This made imposible to loose work by not saving on this scenario of save/close.

It is confusing to have, after a Save As PNG, all layers and masks. It gives the false idea that you are keeping your changes on every save. The warning can be easily missed as the design is not very calling, far from the "ok" button, and blended in the dialog.

Victor has made some good points. I think krita could protect the user a little more on this. It is not that hard to forget on a work session that you changed the format after a Save As, and on an act of carelessness close Krita only to realize after closing that the last time saved was a png. It might not be that common to report as normally the user takes the blame for it, or at least i did.