Document Modification State

Involved development of the OpenMW construction set.
Post Reply
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Document Modification State

Post by Zini »

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?
Chris
Posts: 1625
Joined: 04 Sep 2011, 08:33

Re: Document Modification State

Post by Chris »

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.
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.
User avatar
Greendogo
Posts: 1467
Joined: 26 Aug 2011, 02:04

Re: Document Modification State

Post by Greendogo »

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.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Document Modification State

Post by Zini »

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.
Post Reply