|Re: isModified() returns true on undo though reverting to saved state [message #943586 is a reply to message #943422]
||Sun, 14 October 2012 16:52
| Ed Merks
Registered: July 2009
On 14/10/2012 3:33 PM, Anit Nair wrote:
> Thanks for the comments. I modified the implementation as per the
> generated editor and it seems to work ok. However, there is still some
> behavior which seems little different from what i expected.
> Here is the use case.
> - Open the editor (Save point 1)
> - Make some changes (gets dirty)
> - Undo the changes (goes back to save point 1)
I'd expect it to be clean.
> - Redo the changes and save (save point 2)
I'd expect it to be dirty again and then be clean when you save.
> - Again make some changes ( gets dirty)
Yes, I'd expect it to get dirty.
> - Undo the changes (goes to save point 2)
It should be clean again.
> - Undo again (makes editor dirty as save point 2 is undone)
Yes, it should be dirty again.
> - Undo again, i would expect it to go to save point 1, but it still
> remains dirty.
You saved for save point 2, that's the only command stack state where
it's clean. This reflects the command stack being in the same known
state as the file system. Any other state of the command stack is
dirty. There's only one save point.
> Is this expected behavior, if yes why so.
The command stack is dirty any time the model's state doesn't match the
Powered by FUDForum
. Page generated in 0.01797 seconds