Posted 20 years ago
by Jeff Key
Would it be possible to internally reset the Modified property when the document is saved? The current behavior is inconsistent with how most text editors work. I've tried setting it manually, but it doesn't seem to stick. This is the behavior I'm seeing:
1) Create/Load document
2) Type some text; enough so that a single undo won't undo everything <DocumentModifiedChanged fires - Modified == true>
3) Save
4) Set DocumentModified to false <DocumentModifiedChanged fires - Modified == false >
5) Undo once <DocumentModifiedChanged fires - Modified == true>
6) Undo until you've undone everything. <DocumentModifiedChanged fires - Modified == false>
It looks like it's tracking to the state of the last Text = <string>, not when Modified was last set. It would seem that if Modified is settable that it would be the starting point for the Modified comparison. Modified should be true if text is added or undos are performed to a state prior to Modified bing set.
Does that make sense?
Thanks
1) Create/Load document
2) Type some text; enough so that a single undo won't undo everything <DocumentModifiedChanged fires - Modified == true>
3) Save
4) Set DocumentModified to false <DocumentModifiedChanged fires - Modified == false >
5) Undo once <DocumentModifiedChanged fires - Modified == true>
6) Undo until you've undone everything. <DocumentModifiedChanged fires - Modified == false>
It looks like it's tracking to the state of the last Text = <string>, not when Modified was last set. It would seem that if Modified is settable that it would be the starting point for the Modified comparison. Modified should be true if text is added or undos are performed to a state prior to Modified bing set.
Does that make sense?
Thanks