Still fiddling around with the merge tool. I noticed that documents freshly created by merging are not flagged as modified, because their undo stack is clean. I am going to implement an additional flag that takes care of that.
That brings us to another questions: What about new content files created the regular way? Blank files, in other words. Currently these are not flagged as modified either, meaning you can close them without saving first and you won't get a "This file has been modified. Do you want to save it?" warning.
Should we extend the initial dirty state to these kinds of documents too? I am indecisive here. You won't actually losing any data, since the file would be blank. But still it is a new content file and it can currently be discarded without warning.
Opinions?
Document Modification State
Re: Document Modification State
Makes sense to me. You haven't edited anything yet, so there's no changes that need saving. Text editors I've used behaved the same way: create a New document, and if you don't type anything in for it, you can immediately Close it without a "Do you want to save?" dialog. I think it's more likely that you'd close an empty file when the file was created on accident by pressing a wrong button (or via a moment of mindlessness), rather than because you wanted to create a blank mod and were too lazy to hit Save before closing, and in that case, being asked to save an empty file is just an annoyance.Zini wrote:What about new content files created the regular way? Blank files, in other words. Currently these are not flagged as modified either, meaning you can close them without saving first and you won't get a "This file has been modified. Do you want to save it?" warning.
Re: Document Modification State
Zini: That sort of warning should appear if there is any work done to the base state of a new file, otherwise it is logically unnecessary to present the user with a warning since they would be losing nothing.
Re: Document Modification State
Well, selecting the content file list you want your new content file to be based on, is technically work done. The blank file isn't actually 100% blank.
But I don't feel strongly about this issue either way. And since the consent seems to be that the current implementation is okay, I will leave it at that.
But I don't feel strongly about this issue either way. And since the consent seems to be that the current implementation is okay, I will leave it at that.